No connection timeout available on HttpClient.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

No connection timeout available on HttpClient.

JamesL
Hi Guys.

Just wanted to say what a great job you've done on Ratpack. My last project was trying to use asynchronous servlets on Jetty and to say it was a pain is somewhat of an understatement.

I'm trying to push a new project into production (using Ratpack) but am having issues in handling connection timeouts using the Ratpack HttpClient. After some digging (RequestActionSupport) I've noticed that there is no way of specifiying the connection timeout (which I assume should be via http://netty.io/4.0/api/io/netty/channel/ChannelOption.html#CONNECT_TIMEOUT_MILLIS) via the Ratpack API. Are there any plans to add this feature soon or do you have any suggestions of how to get round this problem?

Thanks, James.
Reply | Threaded
Open this post in threaded view
|

Re: No connection timeout available on HttpClient.

Marcin Erdmann
Yeah, you are right, it's only possible to set the read timeout at the moment (https://github.com/ratpack/ratpack/blob/ce8fd39eeb5c290c197702324552112acc713a8d/ratpack-core/src/main/java/ratpack/http/client/RequestSpec.java#L124). It looks like it shouldn't be hard to add, would you mind opening an issue to add it at https://github.com/ratpack/ratpack/issues?
Reply | Threaded
Open this post in threaded view
|

Re: No connection timeout available on HttpClient.

JamesL
I've added an issue (https://github.com/ratpack/ratpack/issues/791). Let me know if I can be of any more help.

James.