mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 14:05:35 +00:00
Server: improve confusing condition in crashDump()
This commit is contained in:
parent
bf29409a45
commit
45b4fa0e96
@ -1564,7 +1564,8 @@ class Server{
|
|||||||
|
|
||||||
$stamp = Path::join($this->getDataPath(), "crashdumps", ".last_crash");
|
$stamp = Path::join($this->getDataPath(), "crashdumps", ".last_crash");
|
||||||
$crashInterval = 120; //2 minutes
|
$crashInterval = 120; //2 minutes
|
||||||
if(($lastReportTime = @filemtime($stamp)) !== false and !($report = ($lastReportTime + $crashInterval < time()))){
|
if(($lastReportTime = @filemtime($stamp)) !== false and $lastReportTime + $crashInterval >= time()){
|
||||||
|
$report = false;
|
||||||
$this->logger->debug("Not sending crashdump due to last crash less than $crashInterval seconds ago");
|
$this->logger->debug("Not sending crashdump due to last crash less than $crashInterval seconds ago");
|
||||||
}
|
}
|
||||||
@touch($stamp); //update file timestamp
|
@touch($stamp); //update file timestamp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user