Exception on connect being caught by response handler

Christian Migowski chrismfwrd at gmail.com
Wed Nov 24 01:17:55 EST 2010


Hello,

On Tue, Nov 23, 2010 at 11:21 PM, jgalyan <jgalyan at adbrite.com> wrote:

> However, I still have a serious problem:
> When a connection fails (i.e., the remote host has nothing listening on the
> port I'm attempting to connect to), no request is sent to the cache server,
> but netty is still invoking the upstream handlers as though a response has
> been received: my replaying decoder gets called, then the upstream handler's
> messageReceived method is called, which is causing NullPointerExceptions
> because I'm using ChannelLocals to pass state between the downstream and the
> upstream sides of the transaction, which works perfectly fine in another
> project I used netty for.  Shouldn't the upstream decoder & handler only
> ever get called if there has actually been a response?  Why is a
> ConnectException causing messageReceived to fire in the upstream handlers,
> *after* exceptionCaught is fired?

That doesn't seem right and doesn't happen here (not available servers
are usual). I suspect there is something wrong with your code, can you
write a small test program which illustrates the issue you claim?


regards,
christian



More information about the netty-users mailing list