masaori335 commented on a change in pull request #6889:
URL: https://github.com/apache/trafficserver/pull/6889#discussion_r451895351



##########
File path: proxy/http/Http1ClientSession.cc
##########
@@ -264,28 +255,22 @@ Http1ClientSession::do_io_close(int alerrno)
     _reader->consume(_reader->read_avail());
   } else {
     read_state = HCS_CLOSED;
-    SET_HANDLER(&Http1ClientSession::state_wait_for_sm_shutdown);
-    ka_vio = _vc->do_io_read(this, INT64_MAX, read_buffer);
     HttpSsnDebug("[%" PRId64 "] session closed", con_id);
     HTTP_SUM_DYN_STAT(http_transactions_per_client_con, transact_count);
     HTTP_DECREMENT_DYN_STAT(http_current_client_connections_stat);
     conn_decrease = false;
+    // Can go ahead and close the netvc now, but keeping around the session 
object
+    // until all the transactions are closed
+    if (_vc) {
+      _vc->do_io_close();
+      _vc = nullptr;
+    }
   }
   if (transact_count == released_transactions) {
     this->destroy();
   }
 }
 
-int
-Http1ClientSession::state_wait_for_sm_shutdown(int event, void *data)

Review comment:
       So, what we needed at #6809 was only changes in HttpSM after all?




----------------------------------------------------------------
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:
[email protected]


Reply via email to