From fe316e0cfe292e07327e0eb178c3ed4047db7ff8 Mon Sep 17 00:00:00 2001 From: ad hoc Date: Fri, 28 Jun 2024 14:18:42 +0200 Subject: [PATCH] increase ws connection read limit to 10MB --- libsql/internal/ws/websockets.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsql/internal/ws/websockets.go b/libsql/internal/ws/websockets.go index 6aba7b7..004031d 100644 --- a/libsql/internal/ws/websockets.go +++ b/libsql/internal/ws/websockets.go @@ -201,6 +201,8 @@ func connect(url string, jwt string) (*websocketConn, error) { c, _, err := websocket.Dial(ctx, url, &websocket.DialOptions{ Subprotocols: []string{"hrana1"}, }) + + c.SetReadLimit(1024 * 1024 * 10) // 10MB if err != nil { return nil, err }