mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Merge pull request #422 from lwindolf/master
Fix negative values on Sphinx restart
This commit is contained in:
commit
e99f0f672b
2 changed files with 6 additions and 0 deletions
|
@ -54,6 +54,9 @@ if (!file_exists($sTmpFilePath)) {
|
|||
fclose($fp);
|
||||
|
||||
$toShow = (int) ($iCurrent - (int) $iOldCount);
|
||||
if ($toShow < 0) {
|
||||
$toShow = 0;
|
||||
}
|
||||
}
|
||||
|
||||
echo "current.value $toShow\n";
|
||||
|
|
|
@ -54,6 +54,9 @@ if (!file_exists($sTmpFilePath)) {
|
|||
fclose($fp);
|
||||
|
||||
$toShow = (int) ($iCurrent - (int) $iOldCount);
|
||||
if ($toShow < 0) {
|
||||
$toShow = 0;
|
||||
}
|
||||
}
|
||||
|
||||
echo "current.value $toShow\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue