Skip to content

Commit f8e68d5

Browse files
committed
Better code.
1 parent 9fc62b9 commit f8e68d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/Common/ShutdownHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ internal static void RegisterFbClientShutdown(Action item)
4747

4848
static void HandleDomainUnload()
4949
{
50-
foreach (var item in _pools)
50+
while (_pools.TryTake(out var item))
5151
item();
5252
}
5353

5454
static void HandleProcessShutdown()
5555
{
5656
HandleDomainUnload();
57-
foreach (var item in _fbClients)
57+
while (_fbClients.TryTake(out var item))
5858
item();
5959
}
6060
}

0 commit comments

Comments
 (0)