Skip to content
Snippets Groups Projects
Commit 2c0c6500 authored by Tobias S. Josefowitz's avatar Tobias S. Josefowitz
Browse files

Protocols.HTTP: KeptConnection()s may outlast their Session()

parent 852f770c
Branches
Tags
No related merge requests found
......@@ -640,17 +640,21 @@ protected class KeptConnection
}
void disconnect()
{
if (global::this)
{
Thread.MutexKey key = connection_cache_mux->lock(2);
connection_cache[lookup]-=({this});
if (!sizeof(connection_cache[lookup]))
m_delete(connection_cache,lookup);
remove_call_out(disconnect); // if called externally
if (q && q->con) {q->con->close(); destruct(q->con);}
connections_kept_n--;
if (!--connections_host_n[lookup])
m_delete(connections_host_n,lookup);
}
if (q && q->con) {q->con->close(); destruct(q->con);}
destruct(q);
destruct(this);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment