Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php')
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php
index 18451f4daa6..ecb5bb1e3c1 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php
@@ -65,16 +65,20 @@ class NotifyHandler implements INotifyHandler {
*/
public function listen(callable $callback): void {
if ($this->listening) {
- $this->connection->read(function (string $line) use ($callback): bool {
+ while (true) {
+ $line = $this->connection->readLine();
+ if ($line === false) {
+ break;
+ }
$this->checkForError($line);
$change = $this->parseChangeLine($line);
if ($change) {
$result = $callback($change);
- return $result === false ? false : true;
- } else {
- return true;
+ if ($result === false) {
+ break;
+ }
}
- });
+ };
}
}