static void close(NioSocketChannel channel, ChannelFuture future) {
NioWorker worker = channel.worker;
Selector selector = worker.selector;
SelectionKey key = channel.socket.keyFor(selector);
if (key != null) {
key.cancel();
}
boolean connected = channel.isConnected();
boolean bound = channel.isBound();
try {