while self._outbound_event_queue and not force_stop:
time.sleep(self._outbound_send_interval)
Calling stop with force_stop=True would skip waiting for the outbound events to be sent. Then it would stop the workers and do a bit of clean up logic. Then stop gets called a second time by the context manager and will enter an infinite loop if there are still events in the outbound event queue.
Overview
The issue was caused by line 327:
Calling stop with
force_stop=True
would skip waiting for the outbound events to be sent. Then it would stop the workers and do a bit of clean up logic. Then stop gets called a second time by the context manager and will enter an infinite loop if there are still events in the outbound event queue.Changes
0
when forcing a stop.