Skip to content

Commit

Permalink
Fix defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Nov 19, 2021
1 parent e47068e commit 3e6dee3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mautrix_telegram/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,11 @@ def init(context: 'Context') -> Future:
global config
config = context.config
User.bridge = context.bridge
concurrency = config["telegram.connection.concurrent_connections_startup"]
concurrency = config.get("telegram.connection.concurrent_connections_startup", 0)
semaphore = None
block_startup = config["telegram.connection.block_startup"]
block_startup = config.get("telegram.connection.block_startup", True)

if concurrency > 0:
if concurrency:
semaphore = asyncio.Semaphore(concurrency)

async def sem_task(task, index):
Expand Down

0 comments on commit 3e6dee3

Please sign in to comment.