test for value in DBI::errstr

pull/2098/merge
Isaac Connor 2018-05-04 16:00:55 -04:00
parent 375af59657
commit d9b6f4bd85
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ sub run {
if ( ! ( $secs_count % 60 ) ) {
Debug("Connecting");
while ( (!$zm_terminate) and !($dbh and $dbh->ping()) ) {
Warning("Not connected to db ($dbh)".($dbh?" ping(".$dbh->ping().")":''). " errstr($DBI::errstr). Reconnecting");
Warning("Not connected to db ($dbh)".($dbh?" ping(".$dbh->ping().")":''). ($DBI::errstr?" errstr($DBI::errstr)":'').' Reconnecting');
$dbh = zmDbConnect();
}
my @cpuload = CpuLoad();