Skip to content

Commit 789e99c

Browse files
committed
fix(file-decompress): destroy inflate stream on error to avoid resource leak
1 parent 4b78437 commit 789e99c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • apps/sim/app/api/tools/file/manage

apps/sim/app/api/tools/file/manage/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ const inflateEntryWithinCaps = (
255255
stream.on('error', (error) => {
256256
if (settled) return
257257
settled = true
258+
stream.destroy()
258259
reject(error)
259260
})
260261
})

0 commit comments

Comments
 (0)