1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +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: [],
disableDBMigration: false,
start: true,
keepAliveTimeout: 60 * 1000,
headersTimeout: 61 * 1000,
};
}

View File

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