Skip to content

Commit

Permalink
🎨 Set the maximum message size of WebSocket broadcast to 128 MiB
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuoqiu-Yingyi committed Jan 19, 2024
1 parent c8512c5 commit 650bd9e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/api/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 650bd9e

Please sign in to comment.