You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/06/03 00:04:12 UTC

[GitHub] [trafficserver] maskit commented on a change in pull request #7913: Ensure TS_VCONN_CLOSE_HOOK hook is called during TS_EVENT_VCONN_CLOSE.

maskit commented on a change in pull request #7913:
URL: https://github.com/apache/trafficserver/pull/7913#discussion_r644394579



##########
File path: iocore/net/SSLNetVConnection.cc
##########
@@ -1694,6 +1694,12 @@ SSLNetVConnection::callHooks(TSEvent eventId)
   Debug("ssl", "sslHandshakeHookState=%d eventID=%d", this->sslHandshakeHookState, eventId);
 
   // Move state if it is appropriate
+  if (eventId == TS_EVENT_VCONN_CLOSE) {
+    // Regardless of state, if the connection is closing, then transition to
+    // the DONE state. This will trigger us to call the appropriate cleanup
+    // routines.
+    this->sslHandshakeHookState = HANDSHAKE_HOOKS_DONE;
+  }

Review comment:
       Looks reasonable. We may want to put the `switch` statement below into `else` clause to ensure `sslHandshakeHookState` won't be accidentally overwritten in the `switch` statement.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org