I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 3cac1238 authored by jrandom's avatar jrandom Committed by zzz
Browse files

handle reclose, logging, more clear notification

parent b04512a4
No related branches found
No related tags found
No related merge requests found
...@@ -242,7 +242,12 @@ class I2PSocketImpl implements I2PSocket { ...@@ -242,7 +242,12 @@ class I2PSocketImpl implements I2PSocket {
} }
public synchronized void notifyClosed() { public synchronized void notifyClosed() {
notifyAll(); I2PInputStream.this.notifyAll();
}
public void close() throws IOException {
super.close();
notifyClosed();
} }
} }
......
...@@ -322,8 +322,10 @@ public class I2PSocketManager implements I2PSessionListener { ...@@ -322,8 +322,10 @@ public class I2PSocketManager implements I2PSessionListener {
s.internalClose(); s.internalClose();
return; return;
} else { } else {
if ( (payload.length > 0) && (_log.shouldLog(Log.WARN)) ) if ( (payload.length > 0) && (_log.shouldLog(Log.ERROR)) )
_log.warn("Disconnect packet had " + payload.length + " bytes"); _log.error("Disconnect packet had " + payload.length + " bytes");
if (s != null)
s.internalClose();
return; return;
} }
} catch (Exception t) { } catch (Exception t) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment