forked from I2P_Developers/i2p.i2p
merge of '174649506cd8a9665ad798c090e39481af967011'
and '67eb724b7638284d33f1b4997183cc9f197d2883'
This commit is contained in:
@ -98,8 +98,10 @@ class Reader {
|
||||
if (keepReading) {
|
||||
// keep on reading the same one
|
||||
} else {
|
||||
_liveReads.remove(con);
|
||||
con = null;
|
||||
if (con != null) {
|
||||
_liveReads.remove(con);
|
||||
con = null;
|
||||
}
|
||||
if (_pendingConnections.isEmpty()) {
|
||||
_pendingConnections.wait();
|
||||
} else {
|
||||
@ -116,6 +118,10 @@ class Reader {
|
||||
_log.debug("begin read for " + con);
|
||||
try {
|
||||
processRead(con);
|
||||
} catch (IllegalStateException ise) {
|
||||
// FailedEstablishState.receive() (race - see below)
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Error in the ntcp reader", ise);
|
||||
} catch (RuntimeException re) {
|
||||
_log.log(Log.CRIT, "Error in the ntcp reader", re);
|
||||
}
|
||||
@ -153,6 +159,7 @@ class Reader {
|
||||
EventPumper.releaseBuf(buf);
|
||||
break;
|
||||
}
|
||||
// FIXME call est.isCorrupt() before also? throws ISE here... see above
|
||||
est.receive(buf);
|
||||
EventPumper.releaseBuf(buf);
|
||||
if (est.isCorrupt()) {
|
||||
|
Reference in New Issue
Block a user