This is an automated email from the ASF dual-hosted git repository.

shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 33818ba  Adjust connection timeout for TLS
33818ba is described below

commit 33818ba9aa228bd451b004d2d5f408fad7471a60
Author: Susan Hinrichs <shinr...@oath.com>
AuthorDate: Thu Jan 31 22:48:11 2019 +0000

    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 8b117f1..181deb3 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 57caf2b..56e2b81 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.

Reply via email to