We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 064818b commit e8d2f12Copy full SHA for e8d2f12
src/NHibernate/AdoNet/ConnectionManager.cs
@@ -456,7 +456,13 @@ public DbCommand CreateCommand()
456
public void EnlistIfRequired(System.Transactions.Transaction transaction)
457
{
458
if (transaction == _currentSystemTransaction)
459
+ {
460
+ // Short-circuit after having stored the transaction : they may be equal, but not the same reference.
461
+ // And the previous one may be an already disposed dependent clone, in which case we need to update
462
+ // our reference.
463
+ _currentSystemTransaction = transaction;
464
return;
465
+ }
466
467
_currentSystemTransaction = transaction;
468
0 commit comments