mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-14 22:01:59 +00:00
MainLogger: fixed UB in writeLogStream()
notify() has to be used inside a synchronized block.
This commit is contained in:
parent
317a48d9b0
commit
eaf3a86981
@ -347,10 +347,12 @@ class MainLogger extends \AttachableThreadedLogger{
|
|||||||
fwrite($logResource, $chunk);
|
fwrite($logResource, $chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->syncFlush){
|
$this->synchronized(function() : void{
|
||||||
$this->syncFlush = false;
|
if($this->syncFlush){
|
||||||
$this->notify(); //if this was due to a sync flush, tell the caller to stop waiting
|
$this->syncFlush = false;
|
||||||
}
|
$this->notify(); //if this was due to a sync flush, tell the caller to stop waiting
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user