Skip to content

Commit

Permalink
close fds and added libev as an optional dep
Browse files Browse the repository at this point in the history
  • Loading branch information
shawn-mcginty committed Feb 6, 2020
1 parent 9f13d65 commit d77bed1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion naboris.opam
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ depends: [
"reason" {>= "3.4.0"}
"httpaf" {>= "0.6.0"}
"httpaf-lwt-unix" {>= "0.6.0"}
"lwt" {>= "4.2.1"}
"lwt" {>= "5.1.1"}
"uri" {>= "2.2.0"}
]
depopts: [
"conf-libev"
]
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"clean": "esy b dune clean",
"clean-install": "rm -rf node_modules && rm -rf esy.lock && rm -rf _esy",
"clean-world": "npm run clean && npm run clean-install",
"test-coco": "npm run clean && npm run gen-test-json && npm run test && npm run coco-report && npm run gen-prod-json"
"test-coco": "npm run clean && npm run gen-test-json && npm run test && npm run coco-report && npm run gen-prod-json",
"full-libev-test": "esy @libev-test install && LIBEV_TEST=true esy @libev-test b dune runtest"
},
"repository": {
"type": "git",
Expand All @@ -36,7 +37,8 @@
"@opam/reason": ">=3.4.0",
"@opam/httpaf": ">=0.6.0",
"@opam/httpaf-lwt-unix": ">=0.6.0",
"@opam/lwt": ">=4.2.1",
"@opam/conf-libev": ">=4",
"@opam/lwt": ">=5.1.1",
"@opam/uri": ">=2.2.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/Res.re
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ let streamFileContentsToBody = (fullFilePath, responseBody) => {
pipeBody(~count=bufferSize, channel, responseBody),
() => {
Httpaf.Body.close_writer(responseBody);
Unix.close(fd);
Lwt.return_unit;
},
);
Expand Down

0 comments on commit d77bed1

Please sign in to comment.