From c8d45586c19442d9747c5d153c566759e4a5eb8e Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 2 Jan 2022 16:46:35 -0500 Subject: [PATCH] server: Fix stop Gate creation and check --- src/node/server.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node/server.js b/src/node/server.js index 5fef8f330..a6ddc4039 100755 --- a/src/node/server.js +++ b/src/node/server.js @@ -165,7 +165,7 @@ exports.start = async () => { return express.server; }; -let stopDoneGate; +const stopDoneGate = new Gate(); exports.stop = async () => { switch (state) { case State.STARTING: @@ -187,7 +187,6 @@ exports.stop = async () => { throw new Error(`unknown State: ${state.toString()}`); } logger.info('Stopping Etherpad...'); - const stopDoneGate = new Gate(); state = State.STOPPING; try { let timeout = null;