From b671a35379adbdbfec65e086b36fb22a41153d86 Mon Sep 17 00:00:00 2001 From: Andrei Ismail Date: Mon, 22 Jun 2015 11:21:01 +0200 Subject: [PATCH] #292 Ping thread needs to connect to MySQL using timeout in order to be able to throw an exception when the proxy isn't responding anymore --- test/proxysql_ping_thread.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/proxysql_ping_thread.py b/test/proxysql_ping_thread.py index 2d7813b24..57361a57d 100644 --- a/test/proxysql_ping_thread.py +++ b/test/proxysql_ping_thread.py @@ -41,7 +41,8 @@ class ProxySQL_Ping_Thread(Thread): self.username, self.password, port=self.port, - db=self.db) + db=self.db, + connect_timeout=30) cursor = connection.cursor() cursor.execute(self.ping_command) rows = cursor.fetchall()