I2CP: Hopefully fix rare NPE

as reported by drzed
This commit is contained in:
zzz
2024-05-16 09:12:08 -04:00
parent cadb72457c
commit f870b2532f

View File

@@ -758,9 +758,9 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
InputStream in = new BufferedInputStream(_socket.getInputStream(), BUF_SIZE); InputStream in = new BufferedInputStream(_socket.getInputStream(), BUF_SIZE);
_reader = new I2CPMessageReader(in, this); _reader = new I2CPMessageReader(in, this);
} }
}
if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "before startReading"); if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "before startReading");
_reader.startReading(); _reader.startReading();
}
if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Before getDate"); if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Before getDate");
Properties auth = null; Properties auth = null;
if ((!_context.isRouterContext()) && _options.containsKey(I2PClient.PROP_USER) && _options.containsKey(I2PClient.PROP_PW)) { if ((!_context.isRouterContext()) && _options.containsKey(I2PClient.PROP_USER) && _options.containsKey(I2PClient.PROP_PW)) {