From 7e4daded8733db24884406ff7207891a00267e6b Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 1 Jun 2011 22:18:02 +0000 Subject: [PATCH] Fix TMySQLConnection.Ping in situations when FActive is already false, like a detected disconnect when hovering over server status panel. Most probably fixes what's described here: http://www.heidisql.com/forum.php?t=8499 --- source/dbconnection.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 6c09c164..2783e024 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -1233,7 +1233,7 @@ end; function TMySQLConnection.Ping(Reconnect: Boolean): Boolean; begin Log(lcDebug, 'Ping server ...'); - if FActive and ((FHandle=nil) or (mysql_ping(FHandle) <> 0)) then begin + if (FHandle=nil) or (mysql_ping(FHandle) <> 0) then begin // Be sure to release some stuff before reconnecting Active := False; if Reconnect then