Skip to content

Commit cfd541d

Browse files
committed
Removed bogus checkShutdown in QueuingConsumer.nextDelivery(timeout).
1 parent 1191221 commit cfd541d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/com/rabbitmq/client/QueueingConsumer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ public class QueueingConsumer extends DefaultConsumer {
4949
// throw a shutdown signal exception.
5050
private volatile ShutdownSignalException _shutdown;
5151

52-
// Marker object used to signal the queue is in shutdown mode.
52+
// Marker object used to signal the queue is in shutdown mode.
5353
// It is only there to wake up consumers. The canonical representation
54-
// of shutting down is the presence of _shutdown.
54+
// of shutting down is the presence of _shutdown.
5555
// Invariant: This is never on _queue unless _shutdown != null.
5656
private static final Delivery POISON = new Delivery(null, null, null);
5757

@@ -66,7 +66,7 @@ public QueueingConsumer(Channel ch, BlockingQueue<Delivery> q)
6666
}
6767

6868
@Override public void handleShutdownSignal(String consumerTag, ShutdownSignalException sig) {
69-
_shutdown = sig;
69+
_shutdown = sig;
7070
_queue.add(POISON);
7171
}
7272

@@ -162,7 +162,6 @@ public Delivery nextDelivery()
162162
public Delivery nextDelivery(long timeout)
163163
throws InterruptedException, ShutdownSignalException
164164
{
165-
checkShutdown();
166165
return handle(_queue.poll(timeout, TimeUnit.MILLISECONDS));
167166
}
168167
}

0 commit comments

Comments
 (0)