Reputation: 404
I've implemented Netty client code that connects to a server. If the server closes the connection viathe disconnect message, we want the client to continually try to reconnect?
Is this best way to handle TCP Disconnect through the channelInactive callback?
Also, channelInactive will not handle TCP timeout, correct?
Upvotes: 0
Views: 382
Reputation: 23557
channelInactive
or adding a ChannelFutureListener
to Channel.closeFuture()
is the right way to handle this. Just be aware you can not "reconnect" and existing Channel
but need to bootstrap a new one.
Upvotes: 0