netty/netty — Issue #145: No exception when client is killed
Author: ppantera
Created: 2012-01-11 21:10:37+00:00
State: open

I have been using Netty for a while in several production projects and it's great.

Currently I have a situation I can't explain.

I'm using Netty as an embedded web server to implement REST web services. I use the standard web server setup from the docs including HttpRequestDecoder, HttpResponseEncoder, and my own SimpleChannelUpstreamHandler.

In this case I have a client who connects to make a request, and then the client program dies.

I'm not getting any errors when sending the response. I've tried everything. ExceptionCaught is not called. I added a listener to the ChannelFuture returned from Channel.write, and everything is ok (done==true, cause==null).

I'm at the trial-and-error phase where I'm trying everything I can think to get it to work, but it just isn't working. I've upgraded to the latest version (3.2.7). I've tried setting "Connection: close" from the client. I've enabled and disabled tcpNoDelay and keepAlive.

I really need to know whether or not the call succeeds. I was expecting to get some kind of ClosedChannelException or something. Any ideas?