Fixed down server time calculation

This commit is contained in:
fermin831 2017-09-18 11:50:40 +02:00
parent a51952b3ed
commit 4d27093679
1 changed files with 4 additions and 1 deletions

View File

@ -607,7 +607,10 @@ sub main() {
$server->update();
}
db_do ($DBH, "UPDATE tserver SET status = 0 WHERE now()-keepalive > 2*server_keepalive");
db_do ($DBH,
"UPDATE tserver SET status = 0
WHERE UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(keepalive) > 2*server_keepalive"
);
# Set the master server
pandora_set_master(\%Config, $DBH);