From 62c26659834b8b1b71e1554003f4b20ecce4a666 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Thu, 31 Jan 2019 22:48:11 +0000 Subject: [PATCH] Adjust connection timeout for TLS --- iocore/net/UnixNetVConnection.cc | 5 +++-- proxy/http/HttpSM.cc | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 8b117f1ae36..181deb3e00d 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -358,8 +358,9 @@ write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) // vc is an SSLNetVConnection. if (!vc->getSSLHandShakeComplete()) { if (vc->trackFirstHandshake()) { - // Send the write ready on up to the state machine - write_signal_and_update(VC_EVENT_WRITE_READY, vc); + // Eat the first write-ready. Until the TLS handshake is complete, + // we should still be under the connect timeout and shouldn't bother + // the state machine until the TLS handshake is complete vc->write.triggered = 0; nh->write_ready_list.remove(vc); } diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index cf94a9f7b08..03e94ad6d12 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -1784,6 +1784,7 @@ HttpSM::state_http_server_open(int event, void *data) } return 0; } + case VC_EVENT_READ_COMPLETE: case VC_EVENT_WRITE_READY: case VC_EVENT_WRITE_COMPLETE: // Update the time out to the regular connection timeout.