Merge pull request #123679 from seans3/remotecommand-extend-deadlines

Extend deadlines to one minute
This commit is contained in:
Kubernetes Prow Robot 2024-03-04 18:38:32 -08:00 committed by GitHub
commit 0bcf6e3dde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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{}
@ -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.