diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 86206cd8..269661fc 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -364,7 +364,7 @@ class Dispatcher(Router): "Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name ) - # Create a semaphore if concurrent_updates_limit is specified + # Create semaphore if tasks_concurrency_limit is specified semaphore = None if tasks_concurrency_limit is not None and handle_as_tasks: semaphore = asyncio.Semaphore(tasks_concurrency_limit) diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 9bb92423..0b50a2ba 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -810,7 +810,7 @@ class TestDispatcher: tasks_concurrency_limit: int, should_create_semaphore: bool, ): - """Test that semaphore is created only when handle_as_tasks=True and concurrent_updates_limit is not None""" + """Test that semaphore is created only when handle_as_tasks=True and tasks_concurrency_limit is not None""" dispatcher = Dispatcher() async def _mock_updates(*_):