Skip to content

Commit

Permalink
Cleaning only idle connnections (DNET-638).
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Jan 24, 2018
1 parent ba18a5d commit 9e4c058
Showing 1 changed file with 2 additions and 12 deletions.
Expand Up @@ -147,7 +147,6 @@ public void ClearPool()

CleanConnectionsImpl();
_available.Clear();
_busy.Clear();
}
}

Expand All @@ -166,17 +165,8 @@ static long GetTicks()

void CleanConnectionsImpl()
{
Parallel.Invoke(
() =>
{
foreach (var item in _available)
item.Dispose();
},
() =>
{
foreach (var item in _busy)
item.Dispose();
});
foreach (var item in _available)
item.Dispose();
}

void CheckDisposedImpl()
Expand Down

0 comments on commit 9e4c058

Please sign in to comment.