Skip to content

Commit

Permalink
extend deadlines to one minute
Browse files Browse the repository at this point in the history
  • Loading branch information
seans3 committed Mar 4, 2024
1 parent 320e288 commit b04d117
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions staging/src/k8s.io/client-go/tools/remotecommand/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (

// writeDeadline defines the time that a client-side write to the websocket
// connection must complete before an i/o timeout occurs.
const writeDeadline = 30 * time.Second
const writeDeadline = 60 * time.Second

var (
_ Executor = &wsStreamExecutor{}
Expand All @@ -61,8 +61,8 @@ const (
// "pong" message before a timeout error occurs for websocket reading.
// This duration must always be greater than the "pingPeriod". By defining
// this deadline in terms of the ping period, we are essentially saying
// we can drop "X-1" (e.g. 6-1=5) pings before firing the timeout.
pingReadDeadline = (pingPeriod * 6) + (1 * time.Second)
// we can drop "X" (e.g. 12) pings before firing the timeout.
pingReadDeadline = (pingPeriod * 12) + (1 * time.Second)
)

// wsStreamExecutor handles transporting standard shell streams over an httpstream connection.
Expand Down

0 comments on commit b04d117

Please sign in to comment.