Log valu of dbh if not connected

This commit is contained in:
Isaac Connor 2018-04-30 15:09:13 -04:00
parent 469a7347e8
commit 04198aa381
1 changed files with 2 additions and 3 deletions

View File

@ -301,10 +301,9 @@ sub run {
if ( $Config{ZM_SERVER_ID} ) { if ( $Config{ZM_SERVER_ID} ) {
if ( ! ( $secs_count % 60 ) ) { if ( ! ( $secs_count % 60 ) ) {
Debug("Connecting"); Debug("Connecting");
while ( !$zm_terminate and ! ($dbh and $dbh->ping()) ) { while ( (!$zm_terminate) and !($dbh and $dbh->ping()) ) {
Warning("Not connected to db. Reconnecting"); Warning("Not connected to db ($dbh). Reconnecting");
$dbh = zmDbConnect(); $dbh = zmDbConnect();
Debug("Conneted? : $dbh");
} }
my @cpuload = CpuLoad(); my @cpuload = CpuLoad();
Debug("UPdating Server record @cpuload"); Debug("UPdating Server record @cpuload");