[tor-commits] [stem/master] Use awaiting instead of `create_task` while sending a message

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


commit e3d54409cfec1cf6e6cd88f0f64a2b15be84c69f
Author: Illia Volochii <illia.volochii at gmail.com>
Date:   Tue Apr 14 23:31:56 2020 +0300

    Use awaiting instead of `create_task` while sending a message
---
 stem/control.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/stem/control.py b/stem/control.py
index 0cc187b4..0559ee39 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -642,8 +642,7 @@ class BaseController(object):
           break
 
       try:
-        self._asyncio_loop.create_task(self._socket.send(message))
-
+        await self._socket.send(message)
         response = await self._reply_queue.get()
 
         # If the message we received back had an exception then re-raise it to the





More information about the tor-commits mailing list