Skip to content

Commit

Permalink
Fix test server finalization procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Jun 4, 2016
1 parent 3347cdc commit f180199
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aiohttp/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,11 @@ def close(self):
if not self._closed:
loop = self._loop
loop.run_until_complete(self._session.close())
loop.run_until_complete(self._handler.finish_connections())
loop.run_until_complete(self.app.finish())
self._server.close()
loop.run_until_complete(self._server.wait_closed())
loop.run_until_complete(self.app.shutdown())
loop.run_until_complete(self._handler.finish_connections())
loop.run_until_complete(self.app.cleanup())
self._closed = True

def __del__(self):
Expand Down

0 comments on commit f180199

Please sign in to comment.