From 608b1b9674045841746c9360b4dd7f99ca0db976 Mon Sep 17 00:00:00 2001 From: Gard Rimestad Date: Mon, 3 Jul 2023 09:35:02 +0200 Subject: [PATCH] fix: SERVER_KEEPALIVE_TIMEOUT env variable should be seconds (#4130) This changes SERVER_KEEPALIVE_TIMEOUT to take in seconds instead of milliseconds. --- src/lib/create-config.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/create-config.ts b/src/lib/create-config.ts index 6a1bbb5a61..bf3a42ed3c 100644 --- a/src/lib/create-config.ts +++ b/src/lib/create-config.ts @@ -166,9 +166,8 @@ const defaultServerOption: IServerOption = { process.env.ENABLE_HEAP_SNAPSHOT_ENPOINT, false, ), - keepAliveTimeout: parseEnvVarNumber( - process.env.SERVER_KEEPALIVE_TIMEOUT, - secondsToMilliseconds(15), + keepAliveTimeout: secondsToMilliseconds( + parseEnvVarNumber(process.env.SERVER_KEEPALIVE_TIMEOUT, 15), ), headersTimeout: secondsToMilliseconds(61), enableRequestLogger: false,