When I initiative disconnected TCP connection from client side, then I got an exception:
Exception: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at DotNetty.Transport.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at DotNetty.Transport.Channels.Sockets.AbstractSocketByteChannel.SocketByteChannelUnsafe.FinishRead(SocketChannelAsyncOperation operation)
When I initiative disconnected TCP connection from client side, then I got an exception:
Exception: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host at DotNetty.Transport.Channels.Sockets.SocketChannelAsyncOperation.Validate() at DotNetty.Transport.Channels.Sockets.AbstractSocketByteChannel.SocketByteChannelUnsafe.FinishRead(SocketChannelAsyncOperation operation)
How can I avoid this exception?
Below is my code snippet:
` try { serverBootstrap .Group(bossGroup, workerGroup) .Channel()
.Option(ChannelOption.SoBacklog, 200)
.Handler(new MainHandler())
.ChildHandler(
new ActionChannelInitializer(
channel =>
{
IChannelPipeline pipeline = channel.Pipeline;