Closed

Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
If the deadline
argument is deadline.IsZero()
then 1000 hours are used instead:
Lines 448 to 456 in d08ee1a
Expected Behavior
Behaviour should be documented and better design decision has to be made:
Either:
- ignore zero as invalid argument: return
errWriteTimeout
. - ignore zero deadline: The maximum possible deadline should be used, not arbitrary value of 1000 hours.
- respect zero as valid deadline: Fail request immediately.
Steps To Reproduce
Call WriteControl
with a zero-deadline but fail to respond for ~41 days.
This is rather theoretical, but a non-conformant websocket or bad firewall might lead to this.
Anything else?
Originally reported in #841 (comment).
Confirmed as "unexpected" by maintainer in #841 (comment).
In practice probably doesn't affect anybody; it's just weird.