Skip to content

Commit b034dc6

Browse files
author
Emile Joubert
committed
Report Basic.RecoverOk on connection thread
1 parent a29f657 commit b034dc6

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

projects/client/RabbitMQ.Client/src/client/api/IModel.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,14 @@ void HandleBasicGetOk(ulong deliveryTag,
629629
///</remarks>
630630
void HandleBasicGetEmpty();
631631

632+
///<summary>Handle incoming Basic.RecoverOk methods
633+
///received in reply to Basic.Recover . All messages
634+
///received before this is invoked that haven't been
635+
///ack'ed will be redelivered. All messages received
636+
///afterwards won't be.
637+
///</summary>
638+
void HandleBasicRecoverOk();
639+
632640
[AmqpForceOneWay]
633641
[AmqpMethodMapping(null, "basic", "recover")]
634642
void _Private_BasicRecover(bool requeue);

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,6 @@ public void BasicRecover(bool requeue)
798798
}
799799

800800
k.GetReply();
801-
OnBasicRecoverOk(new EventArgs());
802801
}
803802

804803
public abstract void BasicQos(uint prefetchSize,
@@ -970,6 +969,13 @@ public void HandleBasicGetEmpty()
970969
k.HandleCommand(null); // release the continuation.
971970
}
972971

972+
public void HandleBasicRecoverOk()
973+
{
974+
SimpleBlockingRpcContinuation k = (SimpleBlockingRpcContinuation)m_continuationQueue.Next();
975+
k.HandleCommand(null);
976+
OnBasicRecoverOk(new EventArgs());
977+
}
978+
973979
public abstract ConnectionTuneDetails ConnectionStartOk(IDictionary clientProperties,
974980
string mechanism,
975981
byte[] response,

0 commit comments

Comments
 (0)