diff --git a/composer.json b/composer.json index 4c2f297..9a4f0cf 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ }, "autoload": { "psr-4": { - "Swoole\\Async\\": "src" + "Swoole\\Async\\": "src/Swoole/Async/" } } } diff --git a/src/Swoole/Async/ZMQ.php b/src/Swoole/Async/ZMQ.php index 7f53e5b..fb900bd 100644 --- a/src/Swoole/Async/ZMQ.php +++ b/src/Swoole/Async/ZMQ.php @@ -144,7 +144,7 @@ function handleReadEvent() { $events = $this->socket->getSockOpt(\ZMQ::SOCKOPT_EVENTS); - $hasEvents = ($events & \ZMQ::POLL_IN) || ($events & \ZMQ::POLL_OUT && $this->buffer->listening); + $hasEvents = ($events & \ZMQ::POLL_IN) || ($events & \ZMQ::POLL_OUT && $this->listening); if (!$hasEvents) { break; @@ -224,4 +224,4 @@ public function handleWriteEvent() class ZMQException extends \RuntimeException { -} \ No newline at end of file +}