traeak commented on code in PR #10897: URL: https://github.com/apache/trafficserver/pull/10897#discussion_r1419475452
########## src/proxy/http/HttpSessionManager.cc: ########## @@ -440,57 +441,66 @@ HttpSessionManager::_acquire_session(sockaddr const *ip, CryptoHash const &hostn } else { retval = m_g_pool->acquireSession(ip, hostname_hash, match_style, sm, to_return); Debug("http_ss", "[acquire session] global pool search %s", to_return ? "successful" : "failed"); - // At this point to_return has been removed from the pool. Do we need to move it - // to the same thread? - if (to_return) { - UnixNetVConnection *server_vc = dynamic_cast<UnixNetVConnection *>(to_return->get_netvc()); - if (server_vc) { - // Disable i/o on this vc now, but, hold onto the g_pool cont - // and the mutex to stop any stray events from getting in + } + + // At this point to_return has been removed from the pool. + if (nullptr != to_return) { + server_vc = dynamic_cast<UnixNetVConnection *>(to_return->get_netvc()); + if (nullptr != server_vc) { + // Keep things from timing out on us + server_vc->set_inactivity_timeout(server_vc->get_inactivity_timeout()); + + // If thread must be migrated, clear out the VC's + // data and event handling on the original thread. + if (ethread != server_vc->get_thread()) { + SCOPED_MUTEX_LOCK(vclock, server_vc->mutex, ethread); Review Comment: just changing that to try-lock ends up with leaked connection messages in diags.log -- 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: github-unsubscr...@trafficserver.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org