rschildmeijer / deft

High performance non blocking web framework
http://www.deftserver.org
Apache License 2.0
197 stars 25 forks source link

Improve failure handling for AsynchronousHttpClient #125

Closed rschildmeijer closed 13 years ago

rschildmeijer commented 13 years ago

fetch(..) throws (connects to unexisting hostname (eg, http://tasdft.se/start/))

java.nio.channels.UnresolvedAddressException

and if we connect to, eg. http://localhost/start (not listening on port 80), 21:56:42.778 [I/O-LOOP] ERROR org.deftserver.io.IOLoop - Exception received in IOLoop: {} java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.6.0_22] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) ~[na:1.6.0_22] at org.deftserver.io.AsynchronousSocket.handleConnect(AsynchronousSocket.java:95) ~[classes/:na] at org.deftserver.io.IOLoop.start(IOLoop.java:79) ~[classes/:na] at org.deftserver.example.AsynchronousHttpClientExample.main(AsynchronousHttpClientExample.java:15) [classes/:na]

is thrown

rschildmeijer commented 13 years ago

working on this...

rschildmeijer commented 13 years ago

Implements #125 (Improve failure handling for AsynchronousHttpClient) (closed by 826df74cc344d88eeea2653df83cffb0523174f7) patch by rschildmeijer