From f870b2532f21305595e37534f593bb38153a39f1 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 16 May 2024 09:12:08 -0400 Subject: [PATCH] I2CP: Hopefully fix rare NPE as reported by drzed --- core/java/src/net/i2p/client/impl/I2PSessionImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java index b08a3e8b0..8dff24d15 100644 --- a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java @@ -758,9 +758,9 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2 InputStream in = new BufferedInputStream(_socket.getInputStream(), BUF_SIZE); _reader = new I2CPMessageReader(in, this); } + if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "before startReading"); + _reader.startReading(); } - if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "before startReading"); - _reader.startReading(); if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Before getDate"); Properties auth = null; if ((!_context.isRouterContext()) && _options.containsKey(I2PClient.PROP_USER) && _options.containsKey(I2PClient.PROP_PW)) {