Skip to content

Commit

Permalink
Safer state handling in distributed transactions
Browse files Browse the repository at this point in the history
Make sure we don't accidentally set our state to initialized when
an exception occurs.

Related to dotnet#73874.
  • Loading branch information
roji committed Aug 14, 2022
1 parent 1d8cccc commit 0e43de6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public void ConnectToProxy(
pImportWhereabouts.GetWhereabouts(whereaboutsSize, tmpWhereabouts, out uint pcbUsed);
Debug.Assert(pcbUsed == tmpWhereabouts.Length);
});
whereabouts = tmpWhereabouts;

// Now we need to create the internal resource manager.
var rmFactory = (IResourceManagerFactory2)localDispenser;
Expand All @@ -117,6 +116,7 @@ public void ConnectToProxy(

resourceManagerShim = rmShim;
_transactionDispenser = localDispenser;
whereabouts = tmpWhereabouts;
}
}

Expand Down

0 comments on commit 0e43de6

Please sign in to comment.