mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +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:
parent
6a1d80e021
commit
ada3acdba4
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user