Forgot to close the channel

This commit is contained in:
Trustin Lee 2009-02-04 04:05:29 +00:00
parent 2d8b3b0a4e
commit 95584f5c34

View File

@ -635,6 +635,7 @@ class NioWorker implements Runnable {
if (future != null) {
future.setFailure(new ClosedChannelException());
}
close(channel, channel.getSucceededFuture());
return;
}
@ -644,7 +645,10 @@ class NioWorker implements Runnable {
future.setSuccess();
}
} catch (ClosedChannelException e) {
future.setFailure(e);
if (future != null) {
future.setFailure(e);
}
close(channel, channel.getSucceededFuture());
throw new ChannelException(
"Failed to register a socket to the selector.", e);
}