forked from I2P_Developers/i2p.i2p
NTCP: Remove closed connections from write queue (ticket #2686)
This commit is contained in:
@ -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 = 7;
|
||||
public final static long BUILD = 8;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "-rc";
|
||||
|
@ -819,10 +819,12 @@ class EventPumper implements Runnable {
|
||||
if (!_wantsWrite.isEmpty()) {
|
||||
for (Iterator<NTCPConnection> iter = _wantsWrite.iterator(); iter.hasNext(); ) {
|
||||
con = iter.next();
|
||||
iter.remove();
|
||||
if (con.isClosed())
|
||||
continue;
|
||||
SelectionKey key = con.getKey();
|
||||
if (key == null)
|
||||
continue;
|
||||
iter.remove();
|
||||
try {
|
||||
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
|
||||
} catch (CancelledKeyException cke) {
|
||||
|
Reference in New Issue
Block a user