This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 3e84c36718dbe2710a7fe1d9b6be3fcf5cbfa258 Author: Brian Neradt <[email protected]> AuthorDate: Fri Jul 19 09:51:18 2024 -0500 Dispatch WRITE_COMPLETE when TLS handshake completes (#11574) The SSLNetVConnection.cc logic already does this, so this is a port over of that event dispatch functionality when ntodo is 0 for UnixNetVConnection.cc. @josiahwi and I investigated a periodic failure in proxy_protocol.test.py and we noticed that the issue was due to the handshake completing within a single call of sslStartHandshake. In those cases, the ConnectingEntry handler wasn't called back and the connection would hang without progressing with the rest of the request after the handshake completed. This ensures that the ConnectingEntry handler is called in these circumstances. (cherry picked from commit de2c354514d0cb7b58df28692316f227f0d718cc) --- src/iocore/net/UnixNetVConnection.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/iocore/net/UnixNetVConnection.cc b/src/iocore/net/UnixNetVConnection.cc index 9d6d7c60f0..4790016546 100644 --- a/src/iocore/net/UnixNetVConnection.cc +++ b/src/iocore/net/UnixNetVConnection.cc @@ -418,6 +418,12 @@ write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) if (vc->write.enabled) { nh->write_ready_list.in_or_enqueue(vc); } + // If this was driven by a zero length read, signal complete when + // the handshake is complete. Otherwise set up for continuing read + // operations. + if (s->vio.ntodo() <= 0) { + vc->readSignalDone(VC_EVENT_WRITE_COMPLETE, nh); + } } else { write_reschedule(nh, vc); }
