[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 9e08ea9068fd3176cb0c5c6c0aa4f845037e5478
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
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)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits