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

fix: leak on res aborted on non-range requests #246

Closed ronag closed 5 years ago

ronag commented 5 years ago

Currently a non-range request which is aborted will leak a file descriptor. This PR fixes that.

codecov-io commented 5 years ago

Codecov Report

Merging #246 into master will increase coverage by 0.08%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #246      +/-   ##
==========================================
+ Coverage   75.22%   75.31%   +0.08%     
==========================================
  Files          11       11              
  Lines         553      555       +2     
  Branches      126      126              
==========================================
+ Hits          416      418       +2     
  Misses         48       48              
  Partials       89       89
Impacted Files Coverage Δ
lib/ecstatic.js 72.92% <100%> (+0.23%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6481ff4...b9a994f. Read the comment docs.

jfhbrook commented 5 years ago

Thanks!