mirror of
https://github.com/Permissionless-Software-Foundation/psf-bch-api-base.git
synced 2026-09-21 16:52:00 -07:00
fix(timouts): Adjusting network timeout settings
This commit is contained in:
@@ -246,6 +246,11 @@ class Server {
|
||||
wlogger.info(`Server started on port ${this.config.port}`)
|
||||
})
|
||||
|
||||
// Explicit timeout settings reduce stale keep-alive socket reuse races.
|
||||
this.server.keepAliveTimeout = this.config.serverKeepAliveTimeoutMs
|
||||
this.server.headersTimeout = this.config.serverHeadersTimeoutMs
|
||||
this.server.requestTimeout = this.config.serverRequestTimeoutMs
|
||||
|
||||
this.server.on('error', (err) => {
|
||||
console.error('Server error:', err)
|
||||
wlogger.error('Server error:', err)
|
||||
|
||||
Reference in New Issue
Block a user