From: Chocobozzz Date: Thu, 17 Jan 2019 10:23:40 +0000 (+0100) Subject: Fix tests X-Git-Tag: v1.2.0-rc.1~6 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=dc094603cd9eccce3243a6b6ccec3416491f59d2;p=github%2FChocobozzz%2FPeerTube.git Fix tests --- diff --git a/shared/utils/server/servers.ts b/shared/utils/server/servers.ts index 1e9c83c72..cb57e0a69 100644 --- a/shared/utils/server/servers.ts +++ b/shared/utils/server/servers.ts @@ -146,7 +146,11 @@ function runServer (serverNumber: number, configOverride?: Object, args = []) { server.app.stdout.removeListener('data', onStdout) - process.on('exit', () => process.kill(server.app.pid)) + process.on('exit', () => { + try { + process.kill(server.app.pid) + } catch { /* empty */ } + }) res(server) })