Skip to content

Commit 81928c9

Browse files
author
David R. MacIver
committed
It's actually wrong to checkShutdown before nextDelivery: It can cause us to lose the last few deliveries before shutdown. It's also not neccessary
1 parent 554e5e0 commit 81928c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/rabbitmq/client/QueueingConsumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public QueueingConsumer(Channel ch, BlockingQueue<Delivery> q)
7676
byte[] body)
7777
throws IOException
7878
{
79+
checkShutdown();
7980
this._queue.add(new Delivery(envelope, properties, body));
8081
}
8182

@@ -148,7 +149,6 @@ private Delivery handle(Delivery delivery)
148149
public Delivery nextDelivery()
149150
throws InterruptedException, ShutdownSignalException
150151
{
151-
checkShutdown();
152152
return handle(_queue.take());
153153
}
154154

0 commit comments

Comments
 (0)