Skip to content

Commit ec4b25d

Browse files
authored
Removed extra call to asyncio.wait_for (#382)
1 parent be6635e commit ec4b25d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

asgiref/sync.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ async def __call__(self, *args, **kwargs):
436436

437437
try:
438438
# Run the code in the right thread
439-
future = loop.run_in_executor(
439+
ret = await loop.run_in_executor(
440440
executor,
441441
functools.partial(
442442
self.thread_handler,
@@ -448,7 +448,6 @@ async def __call__(self, *args, **kwargs):
448448
**kwargs,
449449
),
450450
)
451-
ret = await asyncio.wait_for(future, timeout=None)
452451

453452
finally:
454453
_restore_context(context)

0 commit comments

Comments
 (0)