hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Allows users to configure the idletimeout and idle check interval.

Open silence-coding opened this issue 4 years ago • 4 comments

The current idle check time and interval are the same parameter. The idle timeout and idle check interval can be configured separately.

https://github.com/hyperium/hyper/blob/4cd06bf25661d7e43e2fdf43eabdb8508055cf3a/src/client/pool.rs#L408 https://github.com/hyperium/hyper/blob/4cd06bf25661d7e43e2fdf43eabdb8508055cf3a/src/client/pool.rs#L448

silence-coding avatar May 19 '21 09:05 silence-coding

Could you explain the motivation for wanting to configure them separately? That it's an interval at all is just an internal detail that I wouldn't normally consider exposing, but I'm curious.

seanmonstar avatar May 19 '21 13:05 seanmonstar

One way to configure idle time is to avoid that when the client sends a request, the server is disconnected. Therefore, a mandatory requirement is that the idle time configured on the client must be less than the idle time configured on the server to avoid the awkward time point.

silence-coding avatar May 21 '21 09:05 silence-coding

The idle precision of the current implementation is poor. Therefore, the current practice is to set the idle time as conservative as possible.

silence-coding avatar May 21 '21 09:05 silence-coding

Is there a follow-up to this question? If not, I will close this issue.

silence-coding avatar Jan 04 '22 03:01 silence-coding