mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
More logging for MessageQueueManagerImpl. #272
This commit is contained in:
@@ -135,9 +135,20 @@ class MessageQueueManagerImpl implements MessageQueueManager {
|
|||||||
|
|
||||||
MessageId popIncomingMessageId() {
|
MessageId popIncomingMessageId() {
|
||||||
Iterator<Entry<Long, MessageId>> it = pending.entrySet().iterator();
|
Iterator<Entry<Long, MessageId>> it = pending.entrySet().iterator();
|
||||||
if (!it.hasNext()) return null;
|
if (!it.hasNext()) {
|
||||||
|
LOG.info("No pending messages");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
Entry<Long, MessageId> e = it.next();
|
Entry<Long, MessageId> e = it.next();
|
||||||
if (!e.getKey().equals(incomingPosition)) return null;
|
if (!e.getKey().equals(incomingPosition)) {
|
||||||
|
if (LOG.isLoggable(INFO)) {
|
||||||
|
LOG.info("First pending message is " + e.getKey() + ", "
|
||||||
|
+ " expecting " + incomingPosition);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (LOG.isLoggable(INFO))
|
||||||
|
LOG.info("Removing pending message " + e.getKey());
|
||||||
it.remove();
|
it.remove();
|
||||||
incomingPosition++;
|
incomingPosition++;
|
||||||
return e.getValue();
|
return e.getValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user