Merge branch 'ssu-sync-fix' into 'master'

lock locked_shouldSend on this

See merge request i2p-hackers/i2p.i2p!3
This commit is contained in:
Zlatin Balevsky
2020-12-18 13:48:40 +00:00

View File

@@ -1662,9 +1662,10 @@ public class PeerState {
} }
/** /**
* Caller should synch * Locks this.
*/ */
private boolean locked_shouldSend(OutboundMessageState state, long now, boolean resetWindow) { private boolean locked_shouldSend(OutboundMessageState state, long now, boolean resetWindow) {
synchronized(this) {
if (allocateSendingBytes(state, now, resetWindow)) { if (allocateSendingBytes(state, now, resetWindow)) {
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug(_remotePeer + " Allocation allowed with " _log.debug(_remotePeer + " Allocation allowed with "
@@ -1683,6 +1684,7 @@ public class PeerState {
+ " for message " + state.getMessageId() + ": " + state); + " for message " + state.getMessageId() + ": " + state);
return false; return false;
} }
}
} }
/** /**