Skip to the content.

Home / cs-notes / Architecture / Components / Netty / Channel / NioServerSocketChannel / isActive

    @Override
    public boolean isActive() {
        // As java.nio.ServerSocketChannel.isBound() will continue to return true even after the channel was closed
        // we will also need to check if it is open.
        return isOpen() && javaChannel().socket().isBound();
    }