You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once Close is called, nothing else can ever be written.
It takes a long time until defer conn.close(nil) happen. If you look at on-wire packets, there can be many data frames being sent after the close frame.
Fair enough, it doesn't explicitly prevent you from writing any additional data but once the peer receives a close frame, it stops reading from the connection so writing any additional garbage data isn't an issue. The RFC states that so that the peer knows not to read anything after a close.
Making all writes after a close frame fail should be really easy anyway so lets take care of this.
From RFC6455 §1.4:
Current implementation does not obey this rule.
The text was updated successfully, but these errors were encountered: