Skip to content

Commit

Permalink
chore(websocket): increase websocket idle timeout from 5s to 10m
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Mar 25, 2024
1 parent a28f269 commit 54bba7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/dashboard/handler/conn_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (w wsWrapper) Read(p []byte) (int, error) {
w.cancel()
return 0, err
}
_ = w.conn.SetReadDeadline(time.Now().Add(5 * time.Second))
_ = w.conn.SetReadDeadline(time.Now().Add(10 * time.Minute))
return r.Read(p)
}

Expand All @@ -78,7 +78,7 @@ func (w wsWrapper) Write(p []byte) (int, error) {
w.cancel()
return 0, err
}
_ = w.conn.SetWriteDeadline(time.Now().Add(5 * time.Second))
_ = w.conn.SetWriteDeadline(time.Now().Add(10 * time.Minute))
return len(p), nil
}

Expand Down

0 comments on commit 54bba7c

Please sign in to comment.