Skip to content

Commit

Permalink
use tasks for batch dns resolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Dec 27, 2023
1 parent a42d66e commit ea767b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bbot/core/helpers/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ async def resolve_batch(self, queries, **kwargs):
batch_size = 250
for i in range(0, len(queries), batch_size):
batch = queries[i : i + batch_size]
tasks = [self._resolve_batch_coro_wrapper(q, **kwargs) for q in batch]
tasks = [asyncio.create_task(self._resolve_batch_coro_wrapper(q, **kwargs)) for q in batch]
async for task in as_completed(tasks):
yield await task

Expand Down

0 comments on commit ea767b1

Please sign in to comment.