Check for null values from I2PSession.receiveMessage()

This commit is contained in:
HungryHobo
2011-03-16 19:11:27 +00:00
parent ec0b072fca
commit 82cb40e9bf

View File

@@ -114,6 +114,11 @@ public class I2PPacketDispatcher extends I2PBoteThread implements I2PSessionMuxe
} catch (I2PSessionException e) {
log.error("Can't get new message from I2PSession.", e);
}
if (msg == null) {
log.error("I2PSession returned a null message: msgId=" + msgId + ", size=" + size + ", " + session);
return;
}
I2PDatagramDissector datagramDissector = new I2PDatagramDissector();
try {
datagramDissector.loadI2PDatagram(msg);