Commit 2b4fd32d authored by justcoding121's avatar justcoding121

try dispose until empty

parent b0023615
......@@ -212,9 +212,12 @@ namespace Titanium.Web.Proxy.Network.Tcp
@lock.Release();
}
while (disposalBag.TryTake(out var connection))
while (!disposalBag.IsEmpty)
{
connection?.Dispose();
if (disposalBag.TryTake(out var connection))
{
connection?.Dispose();
}
}
//cleanup every ten seconds by default
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment