From 2313d82369af2909f73a075305a3086cabb75f0e Mon Sep 17 00:00:00 2001 From: zab2 <zab2@mail.i2p> Date: Sun, 21 Jul 2013 14:54:36 +0000 Subject: [PATCH] toclet #984 : fix deadlock introduced in -4 (ticket #972) --- router/java/src/net/i2p/router/RouterVersion.java | 2 +- .../src/net/i2p/router/transport/ntcp/NTCPConnection.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 4e28a2c8d2..c10128fe62 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 5; + public final static long BUILD = 6; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java b/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java index e4f4a3b0ee..7944bfaa31 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java +++ b/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java @@ -83,7 +83,7 @@ class NTCPConnection { private final Set<FIFOBandwidthLimiter.Request> _bwInRequests; private final Set<FIFOBandwidthLimiter.Request> _bwOutRequests; private long _establishedOn; - private EstablishState _establishState; + private volatile EstablishState _establishState; private final NTCPTransport _transport; private final boolean _isInbound; private volatile boolean _closed; @@ -232,7 +232,7 @@ class NTCPConnection { public void setChannel(SocketChannel chan) { _chan = chan; } public void setKey(SelectionKey key) { _conKey = key; } public boolean isInbound() { return _isInbound; } - public synchronized boolean isEstablished() { return _establishState.isComplete(); } + public boolean isEstablished() { return _establishState.isComplete(); } /** * @since IPv6 -- GitLab