From 18de41ceb4261c62f26c4c2abfee774e8364dc5b Mon Sep 17 00:00:00 2001 From: Shobhit Pathak Date: Thu, 28 Sep 2023 11:30:21 +0530 Subject: [PATCH] Minor fix --- modules/rcon.js | 2 +- readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rcon.js b/modules/rcon.js index 25d383f..dfede38 100644 --- a/modules/rcon.js +++ b/modules/rcon.js @@ -65,7 +65,7 @@ class RconManager { async disconnect_rcon(server_id) { console.log('starting disconnect', server_id) - if (!this.rcons[server_id].connected) { + if ( !(server_id in this.rcons) || (!this.rcons[server_id].connected)) { return Promise.resolve(); } diff --git a/readme.md b/readme.md index 3f022ac..810540a 100644 --- a/readme.md +++ b/readme.md @@ -21,7 +21,7 @@ A simple web panel to control CS2 servers via RCON - Add teams and players - Add password option while setting up the server - Improve UX/UI -- Improve/clean code +- Improve/clean code (This is my first time working with node :P) - Create executable ## Limitations