Skip to content

Commit 35dd206

Browse files
committed
fix: always return a list, even if we catch an exception
1 parent 8d30662 commit 35dd206

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crawl4ai/async_dispatcher.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,6 @@ async def run_urls(
455455

456456
# Update priorities for waiting tasks if needed
457457
await self._update_queue_priorities()
458-
459-
return results
460458

461459
except Exception as e:
462460
if self.monitor:
@@ -467,6 +465,7 @@ async def run_urls(
467465
memory_monitor.cancel()
468466
if self.monitor:
469467
self.monitor.stop()
468+
return results
470469

471470
async def _update_queue_priorities(self):
472471
"""Periodically update priorities of items in the queue to prevent starvation"""

0 commit comments

Comments
 (0)