-
Notifications
You must be signed in to change notification settings - Fork 1.6k
IOExceptionFilters not Invoked on ConnectException #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Reconnection is dealt with the retry mechanism, but there's no exponential backoff. Contributions welcome. |
hi there Im new to open source and would love to contribute to AsyncHttpClient. Can anyone help me get started? Or is AsyncHttpClient for people who are more experienced in open source? |
Shouldn't this be a defect? the point of the filter is to be triggered on IOException. |
@amirhmd Best way is to dig into the code, get familiar with it, and get a stab at fixing an issue, possibly one you hit. I can help with Pull Request review. @tsteff Well, |
…syncHttpClient#426) ### Motivation If we call ``` context.write(ByteBuffer(string: "foo"), promise: nil) context.flush() context.close() ``` there is no guarantee that `"foo"` will be written to the network. Currently the test `testNoBytesSentOverBodyLimit` assumes this however. ### Changes - `testNoBytesSentOverBodyLimit` does not assume anymore, that bytes will be sent before a close of the connection. - Use `XCTAssertEqual` to compare `Equatable` errors.
It appears that if a server is down, the IOExceptionFilter does nothing to attempt reconnecting to the server. I also have also set request retries to Integer.MAX_VALUE.
2013-11-26 18:42:24,011 [New I/O boss #17] DEBUG NettyAsyncHttpProvider Unexpected I/O exception on channel [id: 0xc09e06ee]
java.net.ConnectException: Connection refused: stunspun.corp.gq1.yahoo.com/10.88.182.226:4080
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:735)
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Ideally, there would be a feature to enable exponential backoff on disconnects to maintain a connection between the client and server.
The text was updated successfully, but these errors were encountered: