jetty-reactive-httpclient icon indicating copy to clipboard operation
jetty-reactive-httpclient copied to clipboard

Support for read/write timeout.

Open hubertlapsa opened this issue 2 years ago • 4 comments

Is it possible to set read and write connection timeout using HttpClient? From what I can see, HttpClient does not provide support for set read and write connection timeout.

hubertlapsa avatar May 09 '22 13:05 hubertlapsa

what you want is idle timeout

joakime avatar May 09 '22 13:05 joakime

@hubertlapsa you have to clarify what you exactly mean by read and write timeout. HttpClient supports a variety of timeouts, and chances are that they are already implemented for what you want to do. But it's not clear what you want to do.

sbordet avatar May 09 '22 13:05 sbordet

In the original context, we need an ability to distinguish the connect timeout (which might need a bigger value) from the read/write timeout (when it is expected to be quite low). idleTimeout sounds interesting, but I wonder, if it would work to set high connectTimeout (e.g. 20 seconds) and low idleTimeout (e.g. 2 seconds) - in other word, if idleTimeout won't kick in while waiting for some bytes in connect?

szpak avatar May 16 '22 05:05 szpak

if it would work to set high connectTimeout (e.g. 20 seconds) and low idleTimeout (e.g. 2 seconds)

Yes it would work.

The idleTimeout covers network idleness (both read and write).

sbordet avatar May 16 '22 07:05 sbordet

Closing as answered.

sbordet avatar Mar 08 '23 19:03 sbordet