Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overwriting fs streams will cause fd leaks #165

Closed
jonathanong opened this issue Dec 30, 2013 · 3 comments
Closed

overwriting fs streams will cause fd leaks #165

jonathanong opened this issue Dec 30, 2013 · 3 comments

Comments

@jonathanong
Copy link
Member

this is really only a case when you do this.status = 304, but i'm opening an issue here since koa may want to handle it better. i can't think of a good way to, though.

basically, every time you do fs.createReadStream(), it'll open a descriptor every time. if you unset the body as this.status = 304, then you won't ever "close" the fd.

example: https://gist.github.com/jonathanong/8186604

not sure what to do. the only solution right now other than have node fix their shit is to have conditional-get middleware handle this or have send include 304 handling

@jonathanong
Copy link
Member Author

okay two solutions:

@jonathanong
Copy link
Member Author

this will be handled by #255

@jonathanong
Copy link
Member Author

#255

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant