diff --git a/servc/svc/com/bus/rabbitmq.py b/servc/svc/com/bus/rabbitmq.py index df51212..2727780 100644 --- a/servc/svc/com/bus/rabbitmq.py +++ b/servc/svc/com/bus/rabbitmq.py @@ -64,6 +64,7 @@ def _connect( on_open_callback=lambda _c: self.get_channel(method, args), on_close_callback=self.on_connection_closed, ) + self._conn.ioloop.run_forever() # type: ignore def _close(self, expected=True, reason: Any = None): print("Close method called", flush=True) @@ -193,7 +194,6 @@ def subscribe( # type: ignore (route, inputProcessor, onConsuming, bindEventExchange), blocking=False, ) - self._conn.ioloop.run_forever() # type: ignore elif self.isBlockingConnection(): self.close() return self.subscribe(route, inputProcessor, onConsuming, bindEventExchange)