[ARTEMIS-502] AMQ224044, error acknowledging message: java.lang.NullPointerException, can happen sometimes during load
This commit is contained in:
parent
d947741a92
commit
82019cb3be
|
@ -930,6 +930,11 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
|
|||
|
||||
synchronized (lock) {
|
||||
// This is an optimization, if the reference is the first one, we just poll it.
|
||||
// But first we need to make sure deliveringRefs isn't empty
|
||||
if (deliveringRefs.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (deliveringRefs.peek().getMessage().getMessageID() == messageID) {
|
||||
return deliveringRefs.poll();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue