From 6f75cb1734a09859f7bab00602fc9109598ee1a7 Mon Sep 17 00:00:00 2001 From: cirospaciari Date: Fri, 26 Jan 2024 02:29:43 -0300 Subject: [PATCH] we need this --- src/bun.js/ipc.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bun.js/ipc.zig b/src/bun.js/ipc.zig index 9448769bfbaad9..8498dd6b0a5bcf 100644 --- a/src/bun.js/ipc.zig +++ b/src/bun.js/ipc.zig @@ -519,6 +519,10 @@ fn NewNamedPipeIPCHandler(comptime Context: type) type { while (true) { const result = decodeIPCMessage(slice, globalThis) catch |e| switch (e) { error.NotEnoughBytes => { + // copy the remaining bytes to the start of the buffer + bun.copy(u8, this.ipc.incoming.ptr[0..slice.len], slice); + this.ipc.incoming.len = @truncate(slice.len); + log("hit NotEnoughBytes2", .{}); return; }, error.InvalidFormat => {