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

Skip to content
Snippets Groups Projects
Commit 72054a7d authored by zzz's avatar zzz
Browse files

reorder synch and loop

parent ab2c5ef9
No related branches found
No related tags found
No related merge requests found
...@@ -508,11 +508,10 @@ public class TransientSessionKeyManager extends SessionKeyManager { ...@@ -508,11 +508,10 @@ public class TransientSessionKeyManager extends SessionKeyManager {
_log.info("Received " + tagSet); _log.info("Received " + tagSet);
TagSet old = null; TagSet old = null;
SessionTag dupTag = null; SessionTag dupTag = null;
for (Iterator<SessionTag> iter = sessionTags.iterator(); iter.hasNext();) { synchronized (_inboundTagSets) {
SessionTag tag = iter.next(); for (SessionTag tag : sessionTags) {
if (_log.shouldLog(Log.DEBUG)) //if (_log.shouldLog(Log.DEBUG))
_log.debug("Receiving tag " + tag + " in tagSet: " + tagSet); // _log.debug("Receiving tag " + tag + " in tagSet: " + tagSet);
synchronized (_inboundTagSets) {
old = _inboundTagSets.put(tag, tagSet); old = _inboundTagSets.put(tag, tagSet);
overage = _inboundTagSets.size() - MAX_INBOUND_SESSION_TAGS; overage = _inboundTagSets.size() - MAX_INBOUND_SESSION_TAGS;
if (old != null) { if (old != null) {
...@@ -525,7 +524,7 @@ public class TransientSessionKeyManager extends SessionKeyManager { ...@@ -525,7 +524,7 @@ public class TransientSessionKeyManager extends SessionKeyManager {
} }
} }
} }
} }
if (old != null) { if (old != null) {
// drop both old and tagSet tags // drop both old and tagSet tags
......
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