Skip to content

Commit 4bda191

Browse files
committed
Simpler code.
1 parent bb62e63 commit 4bda191

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnectionPoolManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ internal void Release(FbConnectionInternal connection, bool returnToAvailable)
197197
{
198198
CheckDisposed();
199199

200-
_pools.GetOrAdd(connection.Options.NormalizedConnectionString, _ => new Pool(connection.Options)).ReleaseConnection(connection, returnToAvailable);
200+
if (_pools.TryGetValue(connection.Options.NormalizedConnectionString, out var pool))
201+
{
202+
pool.ReleaseConnection(connection, returnToAvailable);
203+
}
201204
}
202205

203206
internal void ClearAllPools()

0 commit comments

Comments
 (0)