Skip to content

Commit 49faf6d

Browse files
authored
Merge pull request #373 from alexbumbacea/remove-exit
#372 - removed exit(), also considering #352
2 parents 6bd77ae + d903bbe commit 49faf6d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Command/BaseConsumerCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public function stopConsumer()
2828
$this->consumer->stopConsuming();
2929
} catch (AMQPTimeoutException $e) {}
3030
}
31-
exit();
3231
}
3332

3433
public function restartConsumer()

RabbitMq/Consumer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public function consume($msgAmount)
4545

4646
while (count($this->getChannel()->callbacks)) {
4747
$this->maybeStopConsumer();
48-
$this->getChannel()->wait(null, false, $this->getIdleTimeout());
48+
if (!$this->forceStop) {
49+
$this->getChannel()->wait(null, false, $this->getIdleTimeout());
50+
}
4951
}
5052
}
5153

0 commit comments

Comments
 (0)