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

Skip to content
Snippets Groups Projects
Commit 4f146772 authored by zzz's avatar zzz
Browse files

* I2CP: Failsafe check for delivery job requeueing forever (ticket #819)

parent 083dffe8
No related branches found
No related tags found
No related merge requests found
2013-01-12 zzz
* EepGet: Don't retry if proxy isn't there
* I2CP: Failsafe check for delivery job requeueing forever (ticket #819)
* jobs.jsp: Add table of pending jobs
* NetDB: Split up files into subdirectories
* SAM: Force i2cp.messageReliability=None (ticket #819)
2013-01-02 zzz 2013-01-02 zzz
* DataHelper: new getASCII() method * DataHelper: new getASCII() method
* DataStructures: * DataStructures:
...@@ -6,7 +13,7 @@ ...@@ -6,7 +13,7 @@
* I2CP: * I2CP:
- Remove unused equals() methods for message classes - Remove unused equals() methods for message classes
- Remove static logs - Remove static logs
- Fix leak if nonce = 0 but reliability != none - Fix leak if nonce = 0 but reliability != none (ticket #819)
- More work on failure codes (ticket #788) - More work on failure codes (ticket #788)
* Logs: Fix setting log filename (ticket #805) * Logs: Fix setting log filename (ticket #805)
* SAM: Synchronize dissector * SAM: Synchronize dissector
......
...@@ -18,7 +18,7 @@ public class RouterVersion { ...@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 4; public final static long BUILD = 5;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";
......
...@@ -628,11 +628,13 @@ class ClientConnectionRunner { ...@@ -628,11 +628,13 @@ class ClientConnectionRunner {
* *
*/ */
private final static long REQUEUE_DELAY = 500; private final static long REQUEUE_DELAY = 500;
private static final int MAX_REQUEUE = 60; // 30 sec.
private class MessageDeliveryStatusUpdate extends JobImpl { private class MessageDeliveryStatusUpdate extends JobImpl {
private final MessageId _messageId; private final MessageId _messageId;
private final int _status; private final int _status;
private long _lastTried; private long _lastTried;
private int _requeueCount;
/** /**
* Do not use for status = STATUS_SEND_ACCEPTED; use ackSendMessage() for that. * Do not use for status = STATUS_SEND_ACCEPTED; use ackSendMessage() for that.
...@@ -662,12 +664,20 @@ class ClientConnectionRunner { ...@@ -662,12 +664,20 @@ class ClientConnectionRunner {
msg.setStatus(_status); msg.setStatus(_status);
if (!alreadyAccepted(_messageId)) { if (!alreadyAccepted(_messageId)) {
_log.warn("Almost send an update for message " + _messageId + " to " if (_requeueCount++ > MAX_REQUEUE) {
// bug requeueing forever? failsafe
_log.error("Abandon update for message " + _messageId + " to "
+ MessageStatusMessage.getStatusString(msg.getStatus()) + MessageStatusMessage.getStatusString(msg.getStatus())
+ " for session " + _sessionId.getSessionId() + " for session " + _sessionId.getSessionId());
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("Almost send an update for message " + _messageId + " to "
+ MessageStatusMessage.getStatusString(msg.getStatus())
+ " for session " + _sessionId.getSessionId()
+ " before they knew the messageId! delaying .5s"); + " before they knew the messageId! delaying .5s");
_lastTried = _context.clock().now(); _lastTried = _context.clock().now();
requeue(REQUEUE_DELAY); requeue(REQUEUE_DELAY);
}
return; return;
} }
......
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