Skip to content

Commit

Permalink
fix: set requestTimeout: 0 to HTTP/1.1 server option for supporting…
Browse files Browse the repository at this point in the history
… Node.js 18
  • Loading branch information
nwtgck committed Apr 8, 2023
1 parent 2d5778b commit 55c89f2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"license": "MIT",
"devDependencies": {
"@types/mocha": "^9.1.1",
"@types/node": "^16.18.21",
"@types/node": "^18.15.11",
"@types/power-assert": "^1.5.8",
"@types/request": "^2.48.8",
"@types/yargs": "^17.0.23",
Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const pipingServer = new piping.Server({ logger });

logger.info(`Piping Server ${VERSION}`);

http.createServer(pipingServer.generateHandler(false))
http.createServer({
requestTimeout: 0,
},
pipingServer.generateHandler(false),
)
.listen({ host, port: httpPort }, () => {
logger.info(`Listen HTTP on ${httpPort}...`);
});
Expand Down

0 comments on commit 55c89f2

Please sign in to comment.