facebookarchive / swift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
900 stars 297 forks source link

Proper connection timeout handling #268

Closed vicmosin closed 9 years ago

vicmosin commented 9 years ago

Sometimes I receive

EXCEPTION, please implement org.jboss.netty.handler.codec.http.HttpChunkAggregator.exceptionCaught() for proper handling.
org.jboss.netty.channel.ConnectTimeoutException: connection timed out: /10.11.10.35:8082
    at org.jboss.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:137)

Can't find any information how to implement that exceptionCaught method.

andrewcox commented 9 years ago

Thanks for pointing this out.

This is not a warning from swift that you should implement exceptionCaught. Rather it is a warning from netty that swift should implement exception caught. I think the server side catches these, but I don't think the client does yet.

Further, the message isn't coming from swift's direct interactions with netty, it's actually coming from swift using nifty, which uses netty. So really this is a nifty issue. Can you please refile this here (and close the issue here once you do): https://github.com/facebook/nifty/issues/new? I'd do it myself, but then you don't seem to be connected to the nifty project yet so I can't add your github ID to the issue so that you can track it.

vicmosin commented 9 years ago

https://github.com/facebook/nifty/issues/132