From 650bd9e8ad31b283e5f2b94cbade9de7603bdd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Sat, 20 Jan 2024 01:50:07 +0800 Subject: [PATCH] :art: Set the maximum message size of WebSocket broadcast to 128 MiB --- kernel/api/broadcast.go | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/api/broadcast.go b/kernel/api/broadcast.go index 15931d2cfca..3a9ddd147e5 100644 --- a/kernel/api/broadcast.go +++ b/kernel/api/broadcast.go @@ -61,6 +61,7 @@ func broadcast(c *gin.Context) { } else { // channel not found, create a new one broadcastChannel := melody.New() + broadcastChannel.Config.MaxMessageSize = 1024 * 1024 * 128 // 128 MiB BroadcastChannels.Store(channel, broadcastChannel) subscribe(c, broadcastChannel, channel)