Skip to content

Commit

Permalink
Merge pull request #50 from joorloohuis/master
Browse files Browse the repository at this point in the history
fix copy/paste error that preventede exchanges from being deleted
  • Loading branch information
Mikhail Bakulin committed Jul 5, 2020
2 parents 38cb47c + 96b3b6b commit aa66e6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/Routing.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function declareQueue(string $queueName)
throw new RuntimeException("Queue `{$queueName}` is not configured.");
}

$channel =
$channel =
$queue = $this->queues[$queueName];
if (!isset($this->queuesDeclared[$queueName])) {
if (ArrayHelper::isAssociative($queue)) {
Expand Down Expand Up @@ -254,8 +254,8 @@ public function deleteQueue(string $queueName)
*/
public function deleteExchange(string $exchangeName)
{
if (!isset($this->queues[$exchangeName])) {
throw new RuntimeException("Queue {$exchangeName} is not configured. Delete is aborted.");
if (!isset($this->exchanges[$exchangeName])) {
throw new RuntimeException("Exchange {$exchangeName} is not configured. Delete is aborted.");
}
$this->getChannel()->exchange_delete($exchangeName);
}
Expand Down

0 comments on commit aa66e6f

Please sign in to comment.