Skip to content

Commit

Permalink
Use create_task() instead of run()
Browse files Browse the repository at this point in the history
  • Loading branch information
felixonmars committed Oct 23, 2022
1 parent f275086 commit ddb66aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydle/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def connected(self):

def stop(self):
""" Stop connection. """
asyncio.run(self.disconnect())
asyncio.create_task(self.disconnect())

async def send(self, data):
""" Add data to send queue. """
Expand Down

0 comments on commit ddb66aa

Please sign in to comment.