Skip to content

Commit

Permalink
Fix headless explorer clean method
Browse files Browse the repository at this point in the history
Signed-off-by: bretfourbe <[email protected]>
  • Loading branch information
bretfourbe authored and fwininger committed Mar 26, 2024
1 parent 9873d10 commit 26997b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wapitiCore/net/intercepting_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,13 @@ async def async_explore(
if self._stopped.is_set():
break

def empty_queue(self):
while not self._queue.empty():
self._queue.get_nowait()
self._queue.task_done()

async def clean(self):
if not self._queue.empty():
await self._queue.join()
self.empty_queue()

# The headless crawler must stop when the stop event is set, let's just wait for it
if self._headless_task:
Expand Down

0 comments on commit 26997b3

Please sign in to comment.