mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
FormatConverter: ensure we don't get stalled due to stdout buffer flood
this can happen due to very noisy outputs during conversion, e.g. if there were many unknown blocks.
This commit is contained in:
@@ -33,6 +33,7 @@ use function basename;
|
||||
use function crc32;
|
||||
use function file_exists;
|
||||
use function floor;
|
||||
use function flush;
|
||||
use function microtime;
|
||||
use function mkdir;
|
||||
use function random_bytes;
|
||||
@@ -150,6 +151,7 @@ class FormatConverter{
|
||||
$diff = $time - $thisRound;
|
||||
$thisRound = $time;
|
||||
$this->logger->info("Converted $counter / $count chunks (" . floor($this->chunksPerProgressUpdate / $diff) . " chunks/sec)");
|
||||
flush();
|
||||
}
|
||||
}
|
||||
$total = microtime(true) - $start;
|
||||
|
Reference in New Issue
Block a user