1
0
forked from wrenn/wrenn

Increase multiplexer fork buffer to 4096 to prevent output drops

64-entry buffer was too small for high-throughput PTY output (e.g.
ls -laihR /). The consumer couldn't drain fast enough over the RPC
stream, causing the non-blocking send fallback to silently discard
data. 4096 entries (~64MB at 16KB/chunk) handles sustained output
without drops while still preventing deadlock on stuck consumers.
This commit is contained in:
2026-04-11 05:16:43 +06:00
parent acc721526d
commit 1826af37a5

View File

@ -56,7 +56,7 @@ func (m *MultiplexedChannel[T]) Fork() (chan T, func()) {
m.mu.Lock() m.mu.Lock()
defer m.mu.Unlock() defer m.mu.Unlock()
consumer := make(chan T, 64) consumer := make(chan T, 4096)
m.channels = append(m.channels, consumer) m.channels = append(m.channels, consumer)