user1495282
user1495282

Reputation: 231

How to stop netty from listening and accepting on server socket

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?

Upvotes: 6

Views: 2521

Answers (1)

trustin
trustin

Reputation: 12351

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

Upvotes: 9

Related Questions