jfhbrook / node-ecstatic

A static file server middleware that works with core http, express or on the CLI!
https://github.com/jfhbrook/node-ecstatic
MIT License
975 stars 194 forks source link

destroy the file stream if the response closes #140

Closed mafintosh closed 9 years ago

mafintosh commented 9 years ago

src.pipe(dst) doesn't close the source stream if the destination closes. this means that ecstatic will leaks file descriptors if the response closes before the file stream ends

jfhbrook commented 9 years ago

Oh word.

Is there any chance that destroy can throw an error or otherwise cause barf? Do we need to protect against that?

jfhbrook commented 9 years ago

Published @0.7.3

Cheers!