From 37f7a1db88d4de38732d658b0252480bdf440481 Mon Sep 17 00:00:00 2001 From: Pepich Date: Thu, 2 Mar 2017 19:23:29 +0100 Subject: [PATCH] Made check connection auto reconnect to prevent timeouts breaking stuff --- src/com/redstoner/modules/check/Check.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/redstoner/modules/check/Check.java b/src/com/redstoner/modules/check/Check.java index bebec13..e99de03 100644 --- a/src/com/redstoner/modules/check/Check.java +++ b/src/com/redstoner/modules/check/Check.java @@ -31,7 +31,7 @@ import com.redstoner.misc.mysql.elements.MysqlDatabase; import com.redstoner.misc.mysql.elements.MysqlTable; import com.redstoner.modules.Module; -@Version(major = 1, minor = 0, revision = 6, compatible = 1) +@Version(major = 1, minor = 0, revision = 7, compatible = 1) public class Check implements Module, Listener { private boolean enabled = false; @@ -49,7 +49,8 @@ public class Check implements Module, Listener } try { - MysqlDatabase database = MysqlHandler.INSTANCE.getDatabase((String) config.get("database")); + MysqlDatabase database = MysqlHandler.INSTANCE + .getDatabase((String) config.get("database") + "?autoReconnect=true"); table = database.getTable((String) config.get("table")); } catch (NullPointerException e)