Skip to content

Commit

Permalink
restore old executor unconditinally
Browse files Browse the repository at this point in the history
  • Loading branch information
jthorniley committed Mar 22, 2023
1 parent 530e572 commit e19ef91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions asgiref/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ def __call__(self, *args, **kwargs):
del self.loop_thread_executors[loop]
_restore_context(context[0])
# Restore old current thread executor state
if old_current_executor:
self.executors.current = old_current_executor
self.executors.current = old_current_executor

# Wait for results from the future.
return call_result.result()
Expand Down

0 comments on commit e19ef91

Please sign in to comment.