mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Merge branch 'stable'
This commit is contained in:
@@ -130,7 +130,7 @@ final class Filesystem{
|
||||
public static function createLockFile(string $lockFilePath) : ?int{
|
||||
$resource = fopen($lockFilePath, "a+b");
|
||||
if($resource === false){
|
||||
throw new \InvalidArgumentException("Invalid lock file path");
|
||||
throw new \InvalidArgumentException("Invalid lock file path or read/write permissions denied");
|
||||
}
|
||||
if(!flock($resource, LOCK_EX | LOCK_NB)){
|
||||
//wait for a shared lock to avoid race conditions if two servers started at the same time - this makes sure the
|
||||
|
@@ -73,6 +73,7 @@ final class MainLoggerThread extends \Thread{
|
||||
*/
|
||||
private function writeLogStream($logResource) : void{
|
||||
while($this->buffer->count() > 0){
|
||||
/** @var string $chunk */
|
||||
$chunk = $this->buffer->shift();
|
||||
fwrite($logResource, $chunk);
|
||||
}
|
||||
|
Reference in New Issue
Block a user