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

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

SSU: Fix OMF looping when timer isn't cancelled after last message acked

Push out timer when no more bandwidth available
Workarounds for now, more changes to follow
parent b9444cdc
No related branches found
No related tags found
No related merge requests found
2020-12-16 zzz
* SSU: Fix occasional high CPU usage
2020-12-11 zzz 2020-12-11 zzz
* Router (proposal 156): * Router (proposal 156):
- Change router ECIES SKM to use N pattern - Change router ECIES SKM to use N pattern
...@@ -8,10 +11,10 @@ ...@@ -8,10 +11,10 @@
2020-12-06 zzz 2020-12-06 zzz
* Console, webapps: Move web resources to wars * Console, webapps: Move web resources to wars
* i2psnark: * i2psnark:
- Add support for web seeds - Add support for web seeds (ticket #2780)
- Preserve file attribute strings in metainfo - Preserve file attribute strings in metainfo
* Streaming: Add Retry-After header to throttle response * Streaming: Add Retry-After header to throttle response
* Util: Change DoH to RFC 8484 protocol * Util: Change DoH to RFC 8484 protocol (ticket #2201)
   
* 2020-12-01 0.9.48 released * 2020-12-01 0.9.48 released
   
......
...@@ -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 = 3; public final static long BUILD = 4;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";
......
...@@ -1491,7 +1491,8 @@ public class PeerState { ...@@ -1491,7 +1491,8 @@ public class PeerState {
synchronized(this) { synchronized(this) {
retransmitTimer = _retransmitTimer; retransmitTimer = _retransmitTimer;
} }
List<OutboundMessageState> rv = allocateSend2(retransmitTimer > 0 && now >= retransmitTimer, now); boolean canSendOld = retransmitTimer > 0 && now >= retransmitTimer;
List<OutboundMessageState> rv = allocateSend2(canSendOld, now);
if (rv != null && !rv.isEmpty()) { if (rv != null && !rv.isEmpty()) {
synchronized(this) { synchronized(this) {
long old = _retransmitTimer; long old = _retransmitTimer;
...@@ -1500,6 +1501,18 @@ public class PeerState { ...@@ -1500,6 +1501,18 @@ public class PeerState {
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug(_remotePeer + " allocated " + rv.size() + " pushing retransmitter from " + old + " to " + _retransmitTimer); _log.debug(_remotePeer + " allocated " + rv.size() + " pushing retransmitter from " + old + " to " + _retransmitTimer);
} }
} else if (canSendOld) {
// failsafe - push out or cancel timer to prevent looping
boolean isEmpty;
synchronized (_outboundMessages) {
isEmpty = _outboundMessages.isEmpty();
}
synchronized(this) {
if (isEmpty)
_retransmitTimer = 0;
else
_retransmitTimer = now + 250;
}
} }
return rv; return rv;
} }
......
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