]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix tests
authorChocobozzz <me@florianbigard.com>
Thu, 17 Jan 2019 10:23:40 +0000 (11:23 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 17 Jan 2019 10:23:40 +0000 (11:23 +0100)
shared/utils/server/servers.ts

index 1e9c83c72ad8bebd4393da73e4b950cebfe9eb4f..cb57e0a69668c04794a374fda53452cb75625352 100644 (file)
@@ -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)
     })