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:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-01-20 23:25:58 +0300
committerGitHub <noreply@github.com>2022-01-20 23:25:58 +0300
commitc0b03000a507f7bdce57eb91deaf4e7d2d67a3b4 (patch)
tree86019acc692b5e207a2c2efa226620e611b0dfa1 /apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php
parent4466eb1f42c037ed3a71e4a0d549fbe7c7295703 (diff)
parent13b8179912630acede43aff844f2d302f552cb80 (diff)
Merge pull request #30782 from nextcloud/backport/29349/stable23v23.0.1rc3
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;
+ }
}
- });
+ };
}
}