Fix cron crash when MySQL connection lost (#80)

This commit is contained in:
Thomas Casteleyn
2019-04-30 11:02:02 +02:00
committed by Pierre Goiffon
parent 15362df69a
commit 5c9d98d12c

View File

@@ -573,8 +573,6 @@ try
}
CronExec($oP, $aProcesses, $bVerbose);
$oMutex->Unlock();
}
else
{
@@ -591,6 +589,22 @@ catch (Exception $e)
$oP->p($e->getTraceAsString());
}
}
finally
{
try
{
$oMutex->Unlock();
}
catch (Exception $e)
{
$oP->p("ERROR: '".$e->getMessage()."'");
if ($bDebug)
{
// Might contain verb parameters such a password...
$oP->p($e->getTraceAsString());
}
}
}
$oP->p("Exiting: ".time().' ('.date('Y-m-d H:i:s').')');