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

Skip to content
Snippets Groups Projects
Commit fc60768a authored by dev's avatar dev
Browse files

prevent an NPE in case the connection is gone already(but that should not happen?)

parent 2024fb1b
No related branches found
No related tags found
No related merge requests found
...@@ -383,7 +383,10 @@ public class EventPumper implements Runnable { ...@@ -383,7 +383,10 @@ public class EventPumper implements Runnable {
ServerSocketChannel servChan = (ServerSocketChannel)key.attachment(); ServerSocketChannel servChan = (ServerSocketChannel)key.attachment();
try { try {
SocketChannel chan = servChan.accept(); SocketChannel chan = servChan.accept();
chan.configureBlocking(false); // don't throw an NPE if the connect is gone again
if(chan == null)
return;
chan.configureBlocking(false);;
if (!_transport.allowConnection()) { if (!_transport.allowConnection()) {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment