Skip to content

Commit 176657d

Browse files
authored
increase buffer size for stream to lines to accomodate oversize packets (#3112)
1 parent 0a3e8b8 commit 176657d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/util/utilfn/streamtolines.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ type lineBuf struct {
2020
inLongLine bool
2121
}
2222

23-
const maxLineLength = 128 * 1024
23+
// needs to be large enough to read the largest RPC packet
24+
// there are some legacy file transfer packets that can send up to 32m (base64 encoded)
25+
const maxLineLength = 64 * 1024 * 1024
2426

2527
func ReadLineWithTimeout(ch chan LineOutput, timeout time.Duration) (string, error) {
2628
select {

0 commit comments

Comments
 (0)