larger buffer

This commit is contained in:
Egor Aristov 2025-11-06 10:47:32 +03:00
parent 9a7ee9f284
commit b5b97c4b8d
Signed by: egor3f
GPG Key ID: 40482A264AAEC85F

View File

@ -22,6 +22,7 @@ import (
)
const ipcSocketArg = "--ipc-socket"
const maxMessageLength = 1 * 1024 * 1024 * 1024 // 1 gigabyte
type StdioMode int
@ -61,6 +62,7 @@ type ipcCommon struct {
func (ipc *ipcCommon) readConn() {
scn := bufio.NewScanner(ipc.conn)
scn.Buffer(nil, maxMessageLength)
for scn.Scan() {
var msg Message
if err := json.Unmarshal(scn.Bytes(), &msg); err != nil {