Skip to content

Commit

Permalink
rougeth#175: Changed Bottery.stop behavior.
Browse files Browse the repository at this point in the history
This patch fixes two problems in the Bottery.stop behavior:
1. self.session.close() was not awaited;
2. self.loop.close() causes an exception "Can not close running loop" in
some cases.
  • Loading branch information
ivkalita committed Oct 23, 2018
1 parent 52f7142 commit 4ddefff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bottery/bottery.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ def run(self, server_port):
self.loop.run_forever()

def stop(self):
self.session.close()
self.loop.close()
asyncio.gather(self.session.close())
self.loop.stop()

0 comments on commit 4ddefff

Please sign in to comment.