actually only shut down once

This commit is contained in:
Florian Dold 2020-08-07 12:09:32 +05:30
parent 08ec98af77
commit a5d8d5349d
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -220,7 +220,7 @@ export class GlobalTestState {
testDir: string; testDir: string;
procs: ProcessWrapper[]; procs: ProcessWrapper[];
servers: http.Server[]; servers: http.Server[];
inShutdown: false; inShutdown: boolean = false;
constructor(params: GlobalTestParams) { constructor(params: GlobalTestParams) {
this.testDir = params.testDir; this.testDir = params.testDir;
this.procs = []; this.procs = [];
@ -312,6 +312,7 @@ export class GlobalTestState {
if (this.inShutdown) { if (this.inShutdown) {
return; return;
} }
this.inShutdown = true;
console.log("shutting down"); console.log("shutting down");
for (const s of this.servers) { for (const s of this.servers) {
s.close(); s.close();