[tor-commits] [stem/master] Use a new event loop for wrapping the asynchronous controller

atagar at torproject.org atagar at torproject.org
Thu Jul 16 01:28:59 UTC 2020


commit 9e08ea9068fd3176cb0c5c6c0aa4f845037e5478
Author: Illia Volochii <illia.volochii at gmail.com>
Date:   Sun Apr 26 21:45:03 2020 +0300

    Use a new event loop for wrapping the asynchronous controller
---
 stem/control.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/control.py b/stem/control.py
index db539539..95fba5bf 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -3899,7 +3899,7 @@ class Controller(_ControllerClassMethodMixin, _BaseControllerSocketMixin):
     return instance
 
   def __init__(self, control_socket: 'stem.socket.ControlSocket', is_authenticated: bool = False) -> None:
-    self._asyncio_loop = asyncio.get_event_loop()
+    self._asyncio_loop = asyncio.new_event_loop()
 
     self._asyncio_thread = threading.Thread(target=self._asyncio_loop.run_forever, name='asyncio')
     self._asyncio_thread.setDaemon(True)





More information about the tor-commits mailing list