diff --git a/src/common/helper.ts b/src/common/helper.ts index a0f4e627ea9ad..098de5a520de4 100644 --- a/src/common/helper.ts +++ b/src/common/helper.ts @@ -364,9 +364,9 @@ async function getReadableFromProtocolStream( const response = await client.send('IO.read', { handle, size }); this.push(response.data, response.base64Encoded ? 'base64' : undefined); if (response.eof) { - this.push(null); eof = true; await client.send('IO.close', { handle }); + this.push(null); } }, });