Skip to content

Commit

Permalink
Set write deadline in client/agent connections
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud authored and Craig Jellick committed Sep 19, 2018
1 parent a0f6626 commit 0f6027a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/remotedialer/wsconn.go
Expand Up @@ -24,6 +24,7 @@ func newWSConn(conn *websocket.Conn) *wsConn {
func (w *wsConn) WriteMessage(messageType int, data []byte) error {
w.Lock()
defer w.Unlock()
w.conn.SetWriteDeadline(time.Now().Add(PingWaitDuration))
return w.conn.WriteMessage(messageType, data)
}

Expand Down

0 comments on commit 0f6027a

Please sign in to comment.