1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: add keepAliveTimeout option

This commit is contained in:
Ivar Conradi Østhus 2020-07-13 21:40:22 +02:00
parent b3c0562f96
commit 58f36d03ea
2 changed files with 4 additions and 0 deletions

View File

@ -52,6 +52,8 @@ function defaultOptions() {
customContextFields: [], customContextFields: [],
disableDBMigration: false, disableDBMigration: false,
start: true, start: true,
keepAliveTimeout: 60 * 1000,
headersTimeout: 61 * 1000,
}; };
} }

View File

@ -66,6 +66,8 @@ async function createApp(options) {
const server = app.listen(options.listen, () => const server = app.listen(options.listen, () =>
logger.info('Unleash has started.', server.address()), logger.info('Unleash has started.', server.address()),
); );
server.keepAliveTimeout = options.keepAliveTimeout;
server.headersTimeout = options.headersTimeout;
server.on('listening', () => { server.on('listening', () => {
resolve({ ...payload, server }); resolve({ ...payload, server });
}); });