mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-18 19:16:43 +00:00
Fix n might be None when stopping workers
This commit is contained in:
parent
f09ab6c6b6
commit
4c7224e56a
@ -71,6 +71,7 @@ class UpdateState:
|
|||||||
# Put dummy ``None`` objects so that they don't need to timeout.
|
# Put dummy ``None`` objects so that they don't need to timeout.
|
||||||
n = self._workers
|
n = self._workers
|
||||||
self._workers = None
|
self._workers = None
|
||||||
|
if n:
|
||||||
with self._updates_lock:
|
with self._updates_lock:
|
||||||
for _ in range(n):
|
for _ in range(n):
|
||||||
self._updates.put(None)
|
self._updates.put(None)
|
||||||
|
Loading…
Reference in New Issue
Block a user