From e32a11910e328164e9dd353e4ec9f281381d5192 Mon Sep 17 00:00:00 2001 From: KOMATA <20227709+HynoR@users.noreply.github.com> Date: Thu, 27 Nov 2025 11:22:33 +0800 Subject: [PATCH] fix: adjust WebSocket buffer sizes in terminal and host API (#11094) --- agent/app/api/v2/terminal.go | 4 ++-- core/app/api/v2/host.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/agent/app/api/v2/terminal.go b/agent/app/api/v2/terminal.go index 613726203..16685edac 100644 --- a/agent/app/api/v2/terminal.go +++ b/agent/app/api/v2/terminal.go @@ -228,8 +228,8 @@ func wshandleError(ws *websocket.Conn, err error) bool { } var upGrader = websocket.Upgrader{ - ReadBufferSize: 1024, - WriteBufferSize: 1024 * 1024 * 10, + ReadBufferSize: 4096, + WriteBufferSize: 16384, CheckOrigin: func(r *http.Request) bool { return true }, diff --git a/core/app/api/v2/host.go b/core/app/api/v2/host.go index 33312855d..621f6d0df 100644 --- a/core/app/api/v2/host.go +++ b/core/app/api/v2/host.go @@ -327,8 +327,8 @@ func (b *BaseApi) WsSsh(c *gin.Context) { } var upGrader = websocket.Upgrader{ - ReadBufferSize: 1024, - WriteBufferSize: 1024 * 1024 * 10, + ReadBufferSize: 4096, + WriteBufferSize: 16384, CheckOrigin: func(r *http.Request) bool { return true },