Skip to content

Commit c7026fb

Browse files
Fix Promote Transaction issue
1 parent 98834fc commit c7026fb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDelegatedTransaction.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ internal void TransactionEnded(Transaction transaction)
413413
_active = false;
414414
_connection = null;
415415
}
416+
// Safest approach is to doom this connection, whose transaction has been aborted externally.
417+
connection.DoomThisConnection();
416418
}
417419
}
418420
}

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlDelegatedTransaction.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ internal void TransactionEnded(SysTx.Transaction transaction)
504504
_active = false;
505505
_connection = null;
506506
}
507+
// Safest approach is to doom this connection, whose transaction has been aborted externally.
508+
connection.DoomThisConnection();
507509
}
508510
}
509511
}

0 commit comments

Comments
 (0)