summary refs log tree commit diff homepage
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.js b/index.js
index aae741b..fba3da4 100644
--- a/index.js
+++ b/index.js
@@ -20,6 +20,11 @@ client.on("auth", function() {
     }
 }).on("end", function() {
     console.log("[INFO] Rcon closed!");
+}).on("error", function() {
+    client.disconnect();
+    setTimeout(function() {
+        client.connect();
+    }, 10000);
 });
 
 client.connect();