NTCP: Tweak previous fix to prevent leak (ticket #2476)

This commit is contained in:
zzz
2019-05-02 12:25:18 +00:00
parent 8cdeff74c7
commit bb86c56e77
3 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
2019-05-02 zzz
* GeoIP Maxmind 2019-04-29
* NTCP: Rare EventPumper 100% CPU fix (ticket #2476)
2019-04-25 zzz

View File

@ -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 = 9;
public final static long BUILD = 10;
/** for example "-test" */
public final static String EXTRA = "-rc";

View File

@ -1128,6 +1128,7 @@ public class NTCPConnection implements Closeable {
synchronized void outboundConnected() {
if (_establishState == EstablishBase.FAILED) {
_conKey.cancel();
try {_chan.close(); } catch (IOException ignored) {}
return;
}
_conKey.interestOps(_conKey.interestOps() | SelectionKey.OP_READ);