forked from I2P_Developers/i2p.i2p
* NTCP: Hopefully fix race NPE, thx devzero
This commit is contained in:
@ -162,6 +162,9 @@ class Reader {
|
|||||||
if (est.isComplete() && est.getExtraBytes() != null)
|
if (est.isComplete() && est.getExtraBytes() != null)
|
||||||
con.recvEncryptedI2NP(ByteBuffer.wrap(est.getExtraBytes()));
|
con.recvEncryptedI2NP(ByteBuffer.wrap(est.getExtraBytes()));
|
||||||
}
|
}
|
||||||
|
// catch race?
|
||||||
|
if (!con.isEstablished())
|
||||||
|
return;
|
||||||
while (!con.isClosed() && (buf = con.getNextReadBuf()) != null) {
|
while (!con.isClosed() && (buf = con.getNextReadBuf()) != null) {
|
||||||
// decrypt the data and push it into an i2np message
|
// decrypt the data and push it into an i2np message
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
|
Reference in New Issue
Block a user