-
Notifications
You must be signed in to change notification settings - Fork 3.6k
WriteControl() changes WriteDeadline permanently #841
Copy link
Copy link
Closed
Labels
Description
I will, later, dig out more information to support this.
func (*Conn) WriteControl ¶
func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) error
WriteControl writes a control message with the given deadline. The allowed message types are CloseMessage, PingMessage and PongMessage.
The issue here that the documentation implies that the deadline is set for this one message, whereas it actually calls SetWriteDeadline() and changes the deadline for all subsequent writes as well. It also uses a non-documented default value if supplied time zero &time.Time{} so you should expect this function to change your configuration.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done