diff --git a/core/java/src/net/i2p/crypto/TransientSessionKeyManager.java b/core/java/src/net/i2p/crypto/TransientSessionKeyManager.java index 2f9e04b36bfcb217cfed8f84d0cee43adaeab04e..190004b5743741cb8894ba4bab93f173ae9aa859 100644 --- a/core/java/src/net/i2p/crypto/TransientSessionKeyManager.java +++ b/core/java/src/net/i2p/crypto/TransientSessionKeyManager.java @@ -508,11 +508,10 @@ public class TransientSessionKeyManager extends SessionKeyManager { _log.info("Received " + tagSet); TagSet old = null; SessionTag dupTag = null; - for (Iterator<SessionTag> iter = sessionTags.iterator(); iter.hasNext();) { - SessionTag tag = iter.next(); - if (_log.shouldLog(Log.DEBUG)) - _log.debug("Receiving tag " + tag + " in tagSet: " + tagSet); - synchronized (_inboundTagSets) { + synchronized (_inboundTagSets) { + for (SessionTag tag : sessionTags) { + //if (_log.shouldLog(Log.DEBUG)) + // _log.debug("Receiving tag " + tag + " in tagSet: " + tagSet); old = _inboundTagSets.put(tag, tagSet); overage = _inboundTagSets.size() - MAX_INBOUND_SESSION_TAGS; if (old != null) { @@ -525,7 +524,7 @@ public class TransientSessionKeyManager extends SessionKeyManager { } } } - } + } if (old != null) { // drop both old and tagSet tags