How to stop netty from listening and accepting on server socket

netty

Solution

You can just close the `ServerSocketChannel` created by the `ChannelFactory`. Usually, the `ServerSocketChannel` is returned by `ServerBootstrap.bind()`.

Problem

Is there a way to tell netty to stop listening and accepting new connections on a socket, but to finish up any ongoing job on current connections?

Original source