mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +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);
|
||||
}
|
||||
|
||||
if($this->syncFlush){
|
||||
$this->syncFlush = false;
|
||||
$this->notify(); //if this was due to a sync flush, tell the caller to stop waiting
|
||||
}
|
||||
$this->synchronized(function() : void{
|
||||
if($this->syncFlush){
|
||||
$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