Skip to content

Commit

Permalink
Avoid completing an already settled message (Azure#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshaNalluru authored and ramya-rao-a committed Jan 8, 2019
1 parent 536fade commit 7e23f68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/core/messageReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,11 @@ export class MessageReceiver extends LinkEntity {

// If we've made it this far, then user's message handler completed fine. Let us try
// completing the message.
if (this.autoComplete && this.receiveMode === ReceiveMode.peekLock) {
if (
this.autoComplete &&
this.receiveMode === ReceiveMode.peekLock &&
!bMessage.delivery.remote_settled
) {
try {
log[this.receiverType](
"[%s] Auto completing the message with id '%s' on " + "the receiver '%s'.",
Expand Down

0 comments on commit 7e23f68

Please sign in to comment.