Commit 1c73d08d authored by justcoding121's avatar justcoding121

wrap cleanup task with try finally

parent aa2e3340
......@@ -423,6 +423,8 @@ namespace Titanium.Web.Proxy.Network.Tcp
private async Task clearOutdatedConnections()
{
while (runCleanUpTask)
{
try
{
foreach (var item in cache)
{
......@@ -469,10 +471,14 @@ namespace Titanium.Web.Proxy.Network.Tcp
connection?.Dispose();
}
}
}
finally
{
//cleanup every 3 seconds by default
await Task.Delay(1000 * 3);
}
}
}
/// <summary>
......
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