Skip to content

Commit

Permalink
Optimized the worker process to no longer output warn information aft…
Browse files Browse the repository at this point in the history
…er exiting (#6600)
  • Loading branch information
huangdijia authored Mar 15, 2024
1 parent cb48673 commit 90dbe52
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/AMQPConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,17 @@ public function releaseChannel(AMQPChannel $channel, bool $confirm = false): voi
public function close($reply_code = 0, $reply_text = '', $method_sig = [0, 0])
{
try {
$res = parent::close($reply_code, $reply_text, $method_sig);
return parent::close($reply_code, $reply_text, $method_sig);
} catch (Throwable $e) {
if (! $this->exited) {
throw $e;
}
} finally {
$this->setIsConnected(false);
$this->chan->close();
$this->channelManager->flush();
}
return $res;
return null;
}

protected function makeChannelId(): int
Expand Down Expand Up @@ -297,7 +301,7 @@ protected function heartbeat(): void
$this->chan->push($pkt->getvalue(), 0.001);
}
} catch (Throwable $exception) {
$this->logger && $this->logger->error((string) $exception);
$this->logger?->error((string) $exception);
}
}
});
Expand Down

0 comments on commit 90dbe52

Please sign in to comment.