Remove CWMP_KEEP_ALIVE_TIMEOUT
This turned out not to be necessary. Will use SESSION_TIMEOUT for connection timeout.
This commit is contained in:
1 parent
b5efe6c578
commit
6f0e1d66ce
4 files changed
+3
-16
No files matched your search
+1
-3
@@ -81,8 +81,6 @@ if (!cluster.worker) {
|
|||||||
cert: config.get("CWMP_SSL_CERT")
|
cert: config.get("CWMP_SSL_CERT")
|
||||||
};
|
};
|
||||||
|
|
||||||
const keepAliveTimeout = config.get("CWMP_KEEP_ALIVE_TIMEOUT") as number;
|
|
||||||
|
|
||||||
process.on("uncaughtException", err => {
|
process.on("uncaughtException", err => {
|
||||||
if ((err as NodeJS.ErrnoException).code === "ERR_IPC_DISCONNECTED") return;
|
if ((err as NodeJS.ErrnoException).code === "ERR_IPC_DISCONNECTED") return;
|
||||||
logger.error({
|
logger.error({
|
||||||
@@ -118,7 +116,7 @@ if (!cluster.worker) {
|
|||||||
ssl,
|
ssl,
|
||||||
cwmp.listener,
|
cwmp.listener,
|
||||||
cwmp.onConnection,
|
cwmp.onConnection,
|
||||||
keepAliveTimeout
|
0
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|||||||
@@ -88,16 +88,6 @@ CWMP_ACCESS_LOG_FILE
|
|||||||
|
|
||||||
Default: unest
|
Default: unest
|
||||||
|
|
||||||
CWMP_KEEP_ALIVE_TIMEOUT
|
|
||||||
How long (in milliseconds) to maintain an open TCP connection while waiting
|
|
||||||
for the CPE to send the next HTTP request. If a CPE takes longer to respond
|
|
||||||
the server will terminate the TCP connection and store the session details
|
|
||||||
temporarily in the DB cache. This results in a performance hit. Adjust this
|
|
||||||
for better performance if your devices often take longer than 5 seconds to
|
|
||||||
respond.
|
|
||||||
|
|
||||||
Default: ``5000`` (Node's default)
|
|
||||||
|
|
||||||
NBI_WORKER_PROCESSES
|
NBI_WORKER_PROCESSES
|
||||||
The number of worker processes to spawn for genieacs-nbi. A value of 0 means
|
The number of worker processes to spawn for genieacs-nbi. A value of 0 means
|
||||||
as many as there are CPU cores available.
|
as many as there are CPU cores available.
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ const options = {
|
|||||||
CWMP_SSL_KEY: { type: "string", default: "" },
|
CWMP_SSL_KEY: { type: "string", default: "" },
|
||||||
CWMP_LOG_FILE: { type: "path", default: "" },
|
CWMP_LOG_FILE: { type: "path", default: "" },
|
||||||
CWMP_ACCESS_LOG_FILE: { type: "path", default: "" },
|
CWMP_ACCESS_LOG_FILE: { type: "path", default: "" },
|
||||||
CWMP_KEEP_ALIVE_TIMEOUT: { type: "int", default: 0 },
|
|
||||||
|
|
||||||
NBI_WORKER_PROCESSES: { type: "int", default: 0 },
|
NBI_WORKER_PROCESSES: { type: "int", default: 0 },
|
||||||
NBI_PORT: { type: "int", default: 7557 },
|
NBI_PORT: { type: "int", default: 7557 },
|
||||||
|
|||||||
+2
-2
@@ -56,7 +56,7 @@ export function start(
|
|||||||
ssl,
|
ssl,
|
||||||
_listener,
|
_listener,
|
||||||
onConnection?,
|
onConnection?,
|
||||||
keepAliveTimeout: number = 0
|
keepAliveTimeout: number = -1
|
||||||
): void {
|
): void {
|
||||||
listener = _listener;
|
listener = _listener;
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ export function start(
|
|||||||
if (onConnection != null) server.on("connection", onConnection);
|
if (onConnection != null) server.on("connection", onConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keepAliveTimeout) server.keepAliveTimeout = keepAliveTimeout;
|
if (keepAliveTimeout >= 0) server.keepAliveTimeout = keepAliveTimeout;
|
||||||
server.listen(port, networkInterface);
|
server.listen(port, networkInterface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user