Fixed issue: NETTY-157 NioServerSocketChannel.close() does not trigger a channelUnbound event.
* Fixed a case where channelUnbound event is not fired if the specified future is the close future actually
This commit is contained in:
parent
77742f5cf9
commit
ad6888a635
@ -178,12 +178,14 @@ class NioServerSocketPipelineSink extends AbstractChannelSink {
|
||||
boolean bound = channel.isBound();
|
||||
try {
|
||||
channel.socket.close();
|
||||
future.setSuccess();
|
||||
if (channel.setClosed()) {
|
||||
future.setSuccess();
|
||||
if (bound) {
|
||||
fireChannelUnbound(channel);
|
||||
}
|
||||
fireChannelClosed(channel);
|
||||
} else {
|
||||
future.setSuccess();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
|
Loading…
Reference in New Issue
Block a user