psf-bch-api 7.3.7 → 7.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/server.js
CHANGED
|
@@ -246,6 +246,11 @@ class Server {
|
|
|
246
246
|
wlogger.info(`Server started on port ${this.config.port}`)
|
|
247
247
|
})
|
|
248
248
|
|
|
249
|
+
// Explicit timeout settings reduce stale keep-alive socket reuse races.
|
|
250
|
+
this.server.keepAliveTimeout = this.config.serverKeepAliveTimeoutMs
|
|
251
|
+
this.server.headersTimeout = this.config.serverHeadersTimeoutMs
|
|
252
|
+
this.server.requestTimeout = this.config.serverRequestTimeoutMs
|
|
253
|
+
|
|
249
254
|
this.server.on('error', (err) => {
|
|
250
255
|
console.error('Server error:', err)
|
|
251
256
|
wlogger.error('Server error:', err)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "psf-bch-api",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.8",
|
|
4
4
|
"main": "psf-bch-api.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"description": "REST API proxy to Bitcoin Cash infrastructure",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@psf/bch-js": "7.1.
|
|
18
|
+
"@psf/bch-js": "7.1.14",
|
|
19
19
|
"axios": "1.7.7",
|
|
20
20
|
"cors": "2.8.5",
|
|
21
21
|
"dotenv": "16.3.1",
|
|
22
22
|
"express": "5.1.0",
|
|
23
|
-
"minimal-slp-wallet": "7.1.
|
|
23
|
+
"minimal-slp-wallet": "7.1.5",
|
|
24
24
|
"psffpp": "1.2.1",
|
|
25
25
|
"slp-token-media": "1.2.10",
|
|
26
26
|
"winston": "3.11.0",
|
package/src/config/env/common.js
CHANGED
|
@@ -47,6 +47,11 @@ export default {
|
|
|
47
47
|
// Server port
|
|
48
48
|
port: parseInt(process.env.PORT, 10) || 5942,
|
|
49
49
|
|
|
50
|
+
// HTTP server connection lifecycle configuration.
|
|
51
|
+
serverKeepAliveTimeoutMs: Number(process.env.SERVER_KEEPALIVE_TIMEOUT_MS || 3000),
|
|
52
|
+
serverHeadersTimeoutMs: Number(process.env.SERVER_HEADERS_TIMEOUT_MS || 65000),
|
|
53
|
+
serverRequestTimeoutMs: Number(process.env.SERVER_REQUEST_TIMEOUT_MS || 120000),
|
|
54
|
+
|
|
50
55
|
// Environment
|
|
51
56
|
env: process.env.NODE_ENV || 'development',
|
|
52
57
|
|