From edb8590da88da5af5f9fabb80b3a7c1541bbf4cd Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Wed, 24 Sep 2014 13:45:50 +0000 Subject: [PATCH] move log outside synch --- core/java/src/net/i2p/client/I2PSessionImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/src/net/i2p/client/I2PSessionImpl.java b/core/java/src/net/i2p/client/I2PSessionImpl.java index d0ed301380..7fd1759785 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl.java @@ -899,6 +899,8 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa * Close the socket carefully. */ private void closeSocket() { + if (_log.shouldLog(Log.INFO)) + _log.info(getPrefix() + "Closing the socket", new Exception("closeSocket")); synchronized(_stateLock) { changeState(State.CLOSING); locked_closeSocket(); @@ -911,7 +913,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa * Caller must change state. */ private void locked_closeSocket() { - if (_log.shouldLog(Log.INFO)) _log.info(getPrefix() + "Closing the socket", new Exception("closeSocket")); if (_reader != null) { _reader.stopReading(); _reader = null; -- GitLab