From 9082b40abd7fb2c8cfa5675a1d0ff505051b94d0 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Mon, 28 Oct 2019 21:13:07 +0100 Subject: [PATCH] Update rcon-client Update rcon-client to 4.2.0 in order to remove workaround for issue with rcon-client 4.1.0 that has been resolved. --- lib/factorio/server.js | 9 --------- package.json | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/factorio/server.js b/lib/factorio/server.js index aaad92b4..d05cf4f3 100644 --- a/lib/factorio/server.js +++ b/lib/factorio/server.js @@ -621,15 +621,6 @@ class FactorioServer extends events.EventEmitter { this._state = "stopping"; if (this._rconClient) { await this._rconClient.end(); - - // Unfortunately version 4.1.0 of rcon-client doesn't send an - // end event on .end() and causes an error if the close operation - // fails. Wait a bit here to ensure it's closed before killing - // Factorio. This is only an issue on Windows where Factorio is - // terminated without cleanup. - await new Promise((resolve, reject) => { - setTimeout(resolve, 100); - }); } // On linux this sends SIGTERM to the process. On windows this diff --git a/package.json b/package.json index 960e0a8b..6b84b2d7 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "node-factorio-api": "^0.3.8", "node-forge": "^0.7.1", "prom-client": "^10.2.3", - "rcon-client": "^4.0.4", + "rcon-client": "^4.2.0", "request": "^2.83.0", "sanitizer": "^0.1.3", "simple-git": "^1.96.0",