Skip to content

Commit

Permalink
Fixed issue with dialects creating memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkendk committed Mar 13, 2022
1 parent 5f8f998 commit b655674
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Ceen.Database/DatabaseHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public static IDatabaseDialect GetDialect(this IDbConnection connection, IDataba
{
lock (_dialectLock)
{
if (connection is TransactionConnection trc)
connection = trc.Connection;

if (!_dialect.TryGetValue(connection, out var res))
_dialect.Add(connection, res = defaultOverride ?? DefaultDialect(connection));

Expand Down

0 comments on commit b655674

Please sign in to comment.