Skip to content

Commit 785ab23

Browse files
committed
loop close
1 parent d465bc7 commit 785ab23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nest_asyncio2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def run(main, *, debug=False, loop_factory=None):
9090
asyncio.set_event_loop(set_event_loop)
9191
if new_event_loop:
9292
# Avoid ResourceWarning: unclosed event loop
93-
loop.close()
93+
# loop.close()
94+
pass
9495

9596
def _patch_asyncio():
9697
"""Patch asyncio module to use pure Python tasks and futures."""

0 commit comments

Comments
 (0)