You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/06/01 23:08:37 UTC

[trafficserver] 01/02: Adjust connection timeout for TLS

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

zwoop pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 42e00d8f696961e6579c656c02b9a436ce8b384e
Author: Susan Hinrichs <sh...@oath.com>
AuthorDate: Thu Jan 31 22:48:11 2019 +0000

    Adjust connection timeout for TLS
    
    (cherry picked from commit 33818ba9aa228bd451b004d2d5f408fad7471a60)
    
     Conflicts:
    	proxy/http/HttpSM.cc
---
 iocore/net/UnixNetVConnection.cc | 5 +++--
 proxy/http/HttpSM.cc             | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 1ba92e4..7153c24 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -376,8 +376,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 a175e5d..de5efa3 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -1761,7 +1761,7 @@ HttpSM::state_http_server_open(int event, void *data)
       handle_http_server_open();
     }
     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.