shinrich commented on code in PR #9574:
URL: https://github.com/apache/trafficserver/pull/9574#discussion_r1327515381


##########
iocore/net/SSLNetVConnection.cc:
##########
@@ -603,11 +603,20 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread 
*lthread)
   if (!getSSLHandShakeComplete()) {
     int err = 0;
 
+    // May get into logic that will clean up the current VC
+    // Increment the recursion to delay do_io_close cleaup.
+    this->recursion++;
+
     if (get_context() == NET_VCONNECTION_OUT) {
       ret = sslStartHandShake(SSL_EVENT_CLIENT, err);
     } else {
       ret = sslStartHandShake(SSL_EVENT_SERVER, err);
     }
+    if (ret == EVENT_RESTART) {
+      // VC migrated into a new object
+      // Just give up and go home. Events should trigger on the new vc
+      return;

Review Comment:
   And you are exactly right.  Should be dropping the recursion count here too. 
 Should use the scoped pattern to deal with the decrement if we really need to 
manipulate the recursion counter.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to