1
0
mirror of https://github.com/danog/amp.git synced 2024-11-30 04:29:08 +01:00

Invoke watcher callback if events is 0 or 4

4 is UV_DISCONNECT
This commit is contained in:
Aaron Piotrowski 2018-04-06 14:22:39 -05:00
parent c632e40b03
commit 8c8a6da0c2
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -14,7 +14,7 @@ class UvDriver extends Driver {
/** @var resource[] */
private $events = [];
/** @var \Amp\Loop\Watcher[]|\Amp\Loop\Watcher[][] */
/** @var \Amp\Loop\Watcher[][] */
private $watchers = [];
/** @var resource[] */
@ -50,7 +50,7 @@ class UvDriver extends Driver {
}
foreach ($watchers as $watcher) {
if (!($watcher->enabled && $watcher->type & $events)) {
if (!($watcher->enabled && ($watcher->type & $events || ($events | 4) === 4))) {
continue;
}