[tor-commits] [stem/master] Make reconnecting asynchronous
atagar at torproject.org
atagar at torproject.org
Thu Jul 16 01:28:58 UTC 2020
commit 1447f538903a3f11ba5dfd8fffc65e6136b7a715
Author: Illia Volochii <illia.volochii at gmail.com>
Date: Wed Apr 15 21:02:01 2020 +0300
Make reconnecting asynchronous
---
stem/control.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/stem/control.py b/stem/control.py
index b7ebe740..0bf1b35c 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -1084,7 +1084,7 @@ class Controller(BaseController):
import stem.connection
await stem.connection.authenticate(self, *args, **kwargs)
- def reconnect(self, *args: Any, **kwargs: Any) -> None:
+ async def reconnect(self, *args: Any, **kwargs: Any) -> None:
"""
Reconnects and authenticates to our control socket.
@@ -1096,9 +1096,9 @@ class Controller(BaseController):
"""
with self._msg_lock:
- self.connect()
+ await self.connect()
self.clear_cache()
- self.authenticate(*args, **kwargs)
+ await self.authenticate(*args, **kwargs)
@with_default()
def get_info(self, params: Union[str, Sequence[str]], default: Any = UNDEFINED, get_bytes: bool = False) -> Union[str, Dict[str, str]]:
More information about the tor-commits
mailing list