diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index 9c66115de..afadad11e 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -2196,6 +2196,14 @@ class Server{ if($this->getProperty("auto-report.enabled", true) !== false){ $report = true; + + $stamp = $this->getDataPath() . "crashdumps/.last_crash"; + $crashInterval = 120; //2 minutes + if(file_exists($stamp) and !($report = (filemtime($stamp) + $crashInterval < time()))){ + $this->logger->debug("Not sending crashdump due to last crash less than $crashInterval seconds ago"); + } + @touch($stamp); //update file timestamp + $plugin = $dump->getData()["plugin"]; if(is_string($plugin)){ $p = $this->pluginManager->getPlugin($plugin);