[BUG] If deadline
argument to WriteControl
is deadline.IsZero()
then 1000 hours (~41 days) are used as unexpected and undocumented fallback
#895
Labels
Is there an existing issue for this?
Current Behavior
If the
deadline
argument isdeadline.IsZero()
then 1000 hours are used instead:websocket/conn.go
Lines 448 to 456 in d08ee1a
Expected Behavior
Behaviour should be documented and better design decision has to be made:
Either:
errWriteTimeout
.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.
The text was updated successfully, but these errors were encountered: