Skip to content

Commit

Permalink
set server.requestTimeout value to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanakram3 committed Mar 9, 2024
1 parent 4d6dcb4 commit 8ab3a43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion storage-node/src/commands/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,11 @@ Supported values: warn, error, debug, info. Default:debug`,
},
x_host_id: X_HOST_ID,
})
app.listen(port, () => logger.info(`Listening on http://localhost:${port}`))
const server = app.listen(port, () => logger.info(`Listening on http://localhost:${port}`))

// INFO: https://nodejs.org/dist/latest-v18.x/docs/api/http.html#serverrequesttimeout
// Set the server request timeout to 0 to disable it. This was default behaviour pre Node.js 18.x
server.requestTimeout = 0
} catch (err) {
logger.error(`Server error: ${err}`)
this.exit(ExitCodes.ServerError)
Expand Down

0 comments on commit 8ab3a43

Please sign in to comment.