mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Silence dumb exceptions from mysql_ping() call. See https://www.heidisql.com/forum.php?t=23483
This commit is contained in:
@ -2253,9 +2253,20 @@ end;
|
||||
|
||||
|
||||
function TMySQLConnection.Ping(Reconnect: Boolean): Boolean;
|
||||
var
|
||||
IsDead: Boolean;
|
||||
begin
|
||||
Log(lcDebug, 'Ping server ...');
|
||||
if (FHandle=nil) or (mysql_ping(FHandle) <> 0) then begin
|
||||
IsDead := True;
|
||||
try
|
||||
IsDead := (FHandle=nil) or (mysql_ping(FHandle) <> 0);
|
||||
except
|
||||
// silence dumb exceptions from mysql_ping
|
||||
on E:Exception do
|
||||
Log(lcError, E.Message);
|
||||
end;
|
||||
|
||||
if IsDead then begin
|
||||
// Be sure to release some stuff before reconnecting
|
||||
Active := False;
|
||||
if Reconnect then
|
||||
|
Reference in New Issue
Block a user