[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Make `Controller.close_circuit` asynchronous
commit 414c6771b7fe1550fdf4326f80446e66b0c9ebbe
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
Date: Tue Apr 21 22:09:05 2020 +0300
Make `Controller.close_circuit` asynchronous
---
stem/control.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/control.py b/stem/control.py
index 99e74f25..1d4ee689 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -3537,7 +3537,7 @@ class Controller(BaseController):
else:
raise stem.ProtocolError('SETCIRCUITPURPOSE returned unexpected response code: %s' % response.code)
- def close_circuit(self, circuit_id: str, flag: str = '') -> None:
+ async def close_circuit(self, circuit_id: str, flag: str = '') -> None:
"""
Closes the specified circuit.
@@ -3550,7 +3550,7 @@ class Controller(BaseController):
* :class:`stem.InvalidRequest` if not enough information is provided
"""
- response = stem.response._convert_to_single_line(self.msg('CLOSECIRCUIT %s %s' % (circuit_id, flag)))
+ response = stem.response._convert_to_single_line(await self.msg('CLOSECIRCUIT %s %s' % (circuit_id, flag)))
if not response.is_ok():
if response.code in ('512', '552'):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits