mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
dont call notify callback if we dont have a proper change
This commit is contained in:
parent
95a5ecbaf9
commit
4ca899f582
2 changed files with 42 additions and 3 deletions
|
|
@ -59,7 +59,10 @@ class NotifyHandler implements INotifyHandler {
|
|||
public function listen($callback) {
|
||||
if ($this->listening) {
|
||||
$this->connection->read(function ($line) use ($callback) {
|
||||
return $callback($this->parseChangeLine($line));
|
||||
$change = $this->parseChangeLine($line);
|
||||
if ($change) {
|
||||
return $callback($change);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue