diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 514e9b5..a29dda2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: Install Dependencies uses: ramsey/composer-install@v2 - name: Run PHPStan - run: ./vendor/bin/phpstan analyze src --level 0 + run: ./vendor/bin/phpstan analyze src --level 5 test: name: "Run Tests on PHP ${{ matrix.php }} against RabbitMQ ${{ matrix.rabbitmq }} (Composer: ${{ matrix.composer }}; TLS: ${{ matrix.ssl_test }})" runs-on: ubuntu-latest diff --git a/src/Connection.php b/src/Connection.php index bc039ba..a04035a 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -339,13 +339,7 @@ public function awaitConnectionClose(): Protocol\MethodConnectionCloseFrame $deferred = new Deferred(); $this->awaitList[] = [ 'filter' => function (Protocol\AbstractFrame $frame): bool { - if ($frame instanceof Protocol\MethodConnectionCloseFrame) { - return true; - } elseif ($frame instanceof Protocol\MethodConnectionCloseFrame) { - $this->connectionCloseOk(); - throw new ClientException($frame->replyText, $frame->replyCode); - } - return false; + return $frame instanceof Protocol\MethodConnectionCloseFrame; }, 'promise' => $deferred, ];