Commit 3515c97c authored by justcoding121's avatar justcoding121

try dispose until empty

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