fix: data corruption in protocol.handle
(#41894)
This commit is contained in:
parent
46adb0a3a9
commit
4e8c28fdf0
3 changed files with 45 additions and 1 deletions
|
@ -18,7 +18,7 @@ function makeStreamFromPipe (pipe: any): ReadableStream {
|
|||
try {
|
||||
const rv = await pipe.read(buf);
|
||||
if (rv > 0) {
|
||||
controller.enqueue(buf.subarray(0, rv));
|
||||
controller.enqueue(buf.slice(0, rv));
|
||||
} else {
|
||||
controller.close();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue