Skip to content

Commit 536f5ff

Browse files
author
Emile Joubert
committed
Prevent race by reordering
1 parent b3b1dd6 commit 536f5ff

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

projects/client/RabbitMQ.Client/src/client/impl/ModelBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,8 @@ public void HandleBasicGetEmpty()
972972
public void HandleBasicRecoverOk()
973973
{
974974
SimpleBlockingRpcContinuation k = (SimpleBlockingRpcContinuation)m_continuationQueue.Next();
975-
k.HandleCommand(null);
976975
OnBasicRecoverOk(new EventArgs());
976+
k.HandleCommand(null);
977977
}
978978

979979
public abstract ConnectionTuneDetails ConnectionStartOk(IDictionary clientProperties,

projects/client/Unit/src/unit/TestRecoverAfterCancel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
using System;
6060
using System.IO;
6161
using System.Text;
62-
using System.Threading;
6362
using System.Collections;
6463

6564
using RabbitMQ.Client.Impl;
@@ -123,7 +122,6 @@ public void TestRecoverCallback()
123122
int callbackCount = 0;
124123
Channel.BasicRecoverOk += (sender, eventArgs) => callbackCount++;
125124
Channel.BasicRecover(false);
126-
Thread.Sleep(100);
127125
Assert.AreEqual(1, callbackCount);
128126
}
129127

0 commit comments

Comments
 (0)