mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
keep the share usable with the notify command is running
This commit is contained in:
parent
fdb83ce72f
commit
862bf0825d
1 changed files with 3 additions and 3 deletions
|
|
@ -355,10 +355,10 @@ class Share extends AbstractShare {
|
|||
* @return mixed
|
||||
*/
|
||||
public function notify($path, callable $callback) {
|
||||
$this->connect();
|
||||
$connection = $this->getConnection(); // use a fresh connection since the notify command blocks the process
|
||||
$command = 'notify ' . $this->escapePath($path);
|
||||
$this->connection->write($command . PHP_EOL);
|
||||
$this->connection->read(function ($line) use ($callback, $path) {
|
||||
$connection->write($command . PHP_EOL);
|
||||
$connection->read(function ($line) use ($callback, $path) {
|
||||
$code = (int)substr($line, 0, 4);
|
||||
$subPath = substr($line, 5);
|
||||
if ($path === '') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue