From ae38726e6eb0fcdb988e2d97ebf4defcb166b2a9 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Mon, 4 Mar 2024 11:31:56 -0800 Subject: [PATCH] extend deadlines to one minute Kubernetes-commit: b04d1177efb0cfc84b76732848eef8f0ea89b25b --- tools/remotecommand/websocket.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/remotecommand/websocket.go b/tools/remotecommand/websocket.go index e6e893a1..1dc679cb 100644 --- a/tools/remotecommand/websocket.go +++ b/tools/remotecommand/websocket.go @@ -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.