spray icon indicating copy to clipboard operation
spray copied to clipboard

Idle timeout isn't updated when request timeout is set to `Duration.Inf`

Open echojc opened this issue 9 years ago • 0 comments

Normally, when you change the request timeout of a particular connection, spray automatically updates the idle timeout to double that of your request timeout, but only if:

_requestTimeout.isFinite() && _idleTimeout.isFinite() && _idleTimeout <= _requestTimeout

(https://github.com/spray/spray/blob/640f105/spray-can/src/main/scala/spray/can/server/ServerFrontend.scala#L86-L93)

This skips the case where the request timeout is set to Duration.Inf. If the request timeout is set to infinite, the idle timeout will still kick in after the preconfigured time. Is this behaviour expected?

echojc avatar Aug 31 '15 03:08 echojc