From e81a549e7a45307b47c256bbfef3df78f373e6aa Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 16 Oct 2024 12:08:10 -0400 Subject: [PATCH] fix queue bug --- bbot/scanner/manager.py | 4 +--- bbot/scanner/scanner.py | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bbot/scanner/manager.py b/bbot/scanner/manager.py index 3cb1f5fdf..8cbe098a5 100644 --- a/bbot/scanner/manager.py +++ b/bbot/scanner/manager.py @@ -15,9 +15,7 @@ class ScanIngress(BaseInterceptModule): # accept all events regardless of scope distance scope_distance_modifier = None _name = "_scan_ingress" - - # small queue size so we don't drain modules' outgoing queues - _qsize = 10 + _qsize = -1 @property def priority(self): diff --git a/bbot/scanner/scanner.py b/bbot/scanner/scanner.py index 35cbaf220..97550179a 100644 --- a/bbot/scanner/scanner.py +++ b/bbot/scanner/scanner.py @@ -288,7 +288,9 @@ async def _prep(self): self.debug( f"Setting intercept module {intercept_module.name}._incoming_event_queue to previous intercept module {prev_intercept_module.name}.outgoing_event_queue" ) - intercept_module._incoming_event_queue = prev_intercept_module.outgoing_event_queue + interqueue = asyncio.Queue() + intercept_module._incoming_event_queue = interqueue + prev_intercept_module._outgoing_event_queue = interqueue # abort if there are no output modules num_output_modules = len([m for m in self.modules.values() if m._type == "output"])