Skip to content

Commit b3cb701

Browse files
author
Alexandru Scvortov
committed
removed nowait from confirm.select
The ApiGen generates incorrect code for methods that return void and use nowait. The generated code has this in it: > if (nowait) { > ModelSend(__req,null,null); > } It should have this: > if (nowait) { > ModelSend(__req,null,null); > return; > } The functions that do return something, have the return statement in them. For instance, see QueuePurge.
1 parent 77f69a1 commit b3cb701

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,9 @@ uint QueueDelete(string queue,
277277
bool nowait);
278278

279279
///<summary>Enable publisher acknowledgements.</summary>
280-
[AmqpMethodDoNotImplement(null)]
281-
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
282-
void ConfirmSelect(bool multiple);
283-
284-
///<summary>(Spec method) Enable publisher acknowledgements.</summary>
285280
[AmqpMethodDoNotImplement(null)]
286281
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
287-
void ConfirmSelect(bool multiple, bool nowait);
282+
void ConfirmSelect(bool multiple);
288283

289284
///<summary>Start a Basic content-class consumer.</summary>
290285
///<remarks>
@@ -568,9 +563,10 @@ void _Private_BasicConsume(string queue,
568563
///<summary>Used to send a Confirm.Select method. The public
569564
///confirm API calls this while also managing internal
570565
///datastructures.</summary>
571-
[AmqpMethodMapping(null, "confirm", "select")]
572566
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
567+
[AmqpMethodMapping(null, "confirm", "select")]
573568
void _Private_ConfirmSelect(bool multiple,
569+
[AmqpNowaitArgument(null)]
574570
bool nowait);
575571

576572

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -627,12 +627,8 @@ public abstract uint QueueDelete(string queue,
627627
bool nowait);
628628

629629
public void ConfirmSelect(bool multiple) {
630-
ConfirmSelect(multiple, false);
631-
}
632-
633-
public void ConfirmSelect(bool multiple, bool nowait) {
634630
m_pubMsgCount = 0;
635-
_Private_ConfirmSelect(multiple, nowait);
631+
_Private_ConfirmSelect(multiple, false);
636632
}
637633

638634
public abstract void _Private_ConfirmSelect(bool multiple,

0 commit comments

Comments
 (0)