I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 13059692 authored by jrandom's avatar jrandom Committed by zzz
Browse files

requeues aren't absurd in a live net where connectivity sometimes fails (duh)

parent 94beceba
No related branches found
No related tags found
No related merge requests found
......@@ -117,31 +117,23 @@ public abstract class TransportImpl implements Transport {
_context.statManager().addRateData("transport.expiredOnQueueLifetime", lifetime, lifetime);
if (allowRequeue) {
if (true) {
if (_log.shouldLog(Log.ERROR))
_log.error("wtf, requeueing message " + msg.getMessageId() + " of type " + msg.getMessageType(),
new Exception("requeued by"));
log = true;
msg.discardData();
if ( (msg.getExpiration() <= 0) || (msg.getExpiration() > _context.clock().now()) ) {
// this may not be the last transport available - keep going
_context.outNetMessagePool().add(msg);
// don't discard the data yet!
} else {
if ( (msg.getExpiration() <= 0) || (msg.getExpiration() > _context.clock().now()) ) {
// this may not be the last transport available - keep going
_context.outNetMessagePool().add(msg);
// don't discard the data yet!
} else {
if (_log.shouldLog(Log.INFO))
_log.info("No more time left (" + new Date(msg.getExpiration())
+ ", expiring without sending successfully the "
+ msg.getMessageType());
if (msg.getOnFailedSendJob() != null)
_context.jobQueue().addJob(msg.getOnFailedSendJob());
MessageSelector selector = msg.getReplySelector();
if (selector != null) {
_context.messageRegistry().unregisterPending(msg);
}
log = true;
msg.discardData();
if (_log.shouldLog(Log.INFO))
_log.info("No more time left (" + new Date(msg.getExpiration())
+ ", expiring without sending successfully the "
+ msg.getMessageType());
if (msg.getOnFailedSendJob() != null)
_context.jobQueue().addJob(msg.getOnFailedSendJob());
MessageSelector selector = msg.getReplySelector();
if (selector != null) {
_context.messageRegistry().unregisterPending(msg);
}
log = true;
msg.discardData();
}
} else {
if (_log.shouldLog(Log.INFO))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment