I2CP: Fix external I2CP broken when session ID is 0

one chance in 64K, broken since 2005
don't revert previous attempted fix using synching,
that's still a good idea
This commit is contained in:
zzz
2022-04-11 10:30:29 -04:00
parent 1a26e1789c
commit f7c3e06db5

View File

@ -125,7 +125,7 @@ public class MessagePayloadMessage extends I2CPMessageImpl {
*/
@Override
public synchronized void writeMessage(OutputStream out) throws I2CPMessageException, IOException {
if (_sessionId <= 0)
if (_sessionId < 0)
throw new I2CPMessageException("Unable to write out the message, as the session ID has not been defined");
if (_messageId < 0)
throw new I2CPMessageException("Unable to write out the message, as the message ID has not been defined");