File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -196,5 +196,5 @@ async def progress(current, total):
196196
197197 if block :
198198 return await downloader
199- asyncio .get_event_loop ().create_task (downloader )
199+ await asyncio .get_event_loop ().create_task (downloader )
200200 return None
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ async def handle_packet(self, packet):
263263 elif isinstance (msg .body , raw .types .Pong ):
264264 msg_id = msg .body .msg_id
265265 elif self .client is not None :
266- self .loop .create_task (self .client .handle_updates (msg .body ))
266+ await self .loop .create_task (self .client .handle_updates (msg .body ))
267267
268268 if msg_id in self .results :
269269 self .results [msg_id ].value = getattr (msg .body , "result" , msg .body )
@@ -317,11 +317,11 @@ async def recv_worker(self):
317317 )
318318
319319 if self .is_started .is_set ():
320- self .loop .create_task (self .restart ())
320+ await self .loop .create_task (self .restart ())
321321
322322 break
323323
324- self .loop .create_task (self .handle_packet (packet ))
324+ await self .loop .create_task (self .handle_packet (packet ))
325325
326326 log .info ("NetworkTask stopped" )
327327
You can’t perform that action at this time.
0 commit comments