Fix server dummy timeout value

Summary: It has to fit in 32 bit int

Reviewed By: lblasa

Differential Revision: D51478071

fbshipit-source-id: c4512e946c3e47bc235920b133d9f6c739c5ac76
This commit is contained in:
Andrey Goncharov
2023-11-21 04:13:12 -08:00
committed by Facebook GitHub Bot
parent fb37f27ff5
commit 7e2508f045

View File

@@ -341,8 +341,10 @@ process.on('unhandledRejection', (reason, promise) => {
);
});
// It has to fit in 32 bit int
const MAX_TIMEOUT = 2147483647;
// Node.js process never waits for all promises to settle and exits as soon as there is not pending timers or open sockets or tasks in teh macroqueue
const runtimeTimeout = setTimeout(() => {}, Number.MAX_SAFE_INTEGER);
const runtimeTimeout = setTimeout(() => {}, MAX_TIMEOUT);
// eslint-disable-next-line promise/catch-or-return
start()
.catch((e) => {