Skip to content

Commit 86e8978

Browse files
committed
clean up stream if it closes
1 parent c9b9c13 commit 86e8978

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/core/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ module.exports = function createMiddleware(_dir, _options) {
318318
stream.on('error', (err) => {
319319
status['500'](res, next, { error: err });
320320
});
321+
stream.on('close', () => {
322+
stream.destroy();
323+
})
321324
}
322325

323326

0 commit comments

Comments
 (0)