diff --git a/api/http/handler/websocket/exec.go b/api/http/handler/websocket/exec.go index be66e255b..f2457b834 100644 --- a/api/http/handler/websocket/exec.go +++ b/api/http/handler/websocket/exec.go @@ -102,7 +102,10 @@ func (handler *Handler) handleExecRequest(w http.ResponseWriter, r *http.Request if err != nil { return err } - defer websocketConn.Close() + defer func() { + time.Sleep(10 * time.Second) + websocketConn.Close() + }() return hijackExecStartOperation(websocketConn, params.endpoint, params.ID, tokenData.Token) }