Commit 2b4fd32d authored by justcoding121's avatar justcoding121

try dispose until empty

parent b0023615
...@@ -212,10 +212,13 @@ namespace Titanium.Web.Proxy.Network.Tcp ...@@ -212,10 +212,13 @@ namespace Titanium.Web.Proxy.Network.Tcp
@lock.Release(); @lock.Release();
} }
while (disposalBag.TryTake(out var connection)) while (!disposalBag.IsEmpty)
{
if (disposalBag.TryTake(out var connection))
{ {
connection?.Dispose(); connection?.Dispose();
} }
}
//cleanup every ten seconds by default //cleanup every ten seconds by default
await Task.Delay(1000 * 10); await Task.Delay(1000 * 10);
......
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