File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,8 @@ following code contains a race condition:
99
99
// RACE CONDITION
100
100
if (model.IsOpen) {
101
101
// The following method call depends on the model being in open state.
102
- // The state may change between the IsOpen call and the TxCommit call!
103
- model.TxCommit( );
102
+ // The state may change between the IsOpen call and the BasicQos call!
103
+ model.BasicQos(0, 1, false );
104
104
}
105
105
}
106
106
@@ -113,7 +113,7 @@ an invalid state:
113
113
public void BetterMethod(IModel model) {
114
114
try {
115
115
...
116
- model.TxCommit( );
116
+ model.BasicQos(0, 1, false );
117
117
} catch (OperationInterruptedException ope) {
118
118
// Handle one of the many possible reasons why the commit or any
119
119
// other operation before it couldn't be handled
You can’t perform that action at this time.
0 commit comments