Skip to content

Commit aa66e6f

Browse files
author
Mikhail Bakulin
authored
Merge pull request #50 from joorloohuis/master
fix copy/paste error that preventede exchanges from being deleted
2 parents 38cb47c + 96b3b6b commit aa66e6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/Routing.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function declareQueue(string $queueName)
9393
throw new RuntimeException("Queue `{$queueName}` is not configured.");
9494
}
9595

96-
$channel =
96+
$channel =
9797
$queue = $this->queues[$queueName];
9898
if (!isset($this->queuesDeclared[$queueName])) {
9999
if (ArrayHelper::isAssociative($queue)) {
@@ -254,8 +254,8 @@ public function deleteQueue(string $queueName)
254254
*/
255255
public function deleteExchange(string $exchangeName)
256256
{
257-
if (!isset($this->queues[$exchangeName])) {
258-
throw new RuntimeException("Queue {$exchangeName} is not configured. Delete is aborted.");
257+
if (!isset($this->exchanges[$exchangeName])) {
258+
throw new RuntimeException("Exchange {$exchangeName} is not configured. Delete is aborted.");
259259
}
260260
$this->getChannel()->exchange_delete($exchangeName);
261261
}

0 commit comments

Comments
 (0)