Minor tweak to the tx entry code to prevent an unnecessary wait when no Tx is actually in play.
diff --git a/src/main/csharp/NetTxSession.cs b/src/main/csharp/NetTxSession.cs
index 0d344dc..e3a9314 100644
--- a/src/main/csharp/NetTxSession.cs
+++ b/src/main/csharp/NetTxSession.cs
@@ -90,7 +90,7 @@
// If an Async DTC operation is in progress such as Commit or Rollback
// we need to let it complete before deciding if the Session is in a TX
// otherwise we might error out for no reason.
- TransactionContext.DtcWaitHandle.WaitOne(TimeSpan.FromMilliseconds(1000), true);
+ TransactionContext.DtcWaitHandle.WaitOne();
if(TransactionContext.InNetTransaction)
{
diff --git a/src/main/csharp/TransactionContext.cs b/src/main/csharp/TransactionContext.cs
index 194d1b8..97e5df2 100644
--- a/src/main/csharp/TransactionContext.cs
+++ b/src/main/csharp/TransactionContext.cs
@@ -199,7 +199,7 @@
#region Transaction Members used when dealing with .NET System Transactions.
- private readonly ManualResetEvent dtcControlEvent = new ManualResetEvent(false);
+ private readonly ManualResetEvent dtcControlEvent = new ManualResetEvent(true);
public bool InNetTransaction
{