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

This commit is contained in:
dev
2010-06-06 15:49:29 +00:00
parent 2024fb1b65
commit fc60768a66

View File

@ -383,7 +383,10 @@ public class EventPumper implements Runnable {
ServerSocketChannel servChan = (ServerSocketChannel)key.attachment();
try {
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 (_log.shouldLog(Log.WARN))