Skip to content

Commit

Permalink
fix(aiohttp): sleep for 250ms after close (#30)
Browse files Browse the repository at this point in the history
Fixes #29
  • Loading branch information
hizkifw authored Jul 27, 2022
1 parent 6221e2f commit fe1099f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fc2_live_dl/FC2LiveDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ async def __aenter__(self):
async def __aexit__(self, *err):
self._logger.trace("exit", err)
await self._session.close()
# Sleep for 250ms to allow SSL connections to close.
# See: https://github.com/aio-libs/aiohttp/issues/1925
# See: https://github.com/aio-libs/aiohttp/issues/4324
await asyncio.sleep(0.250)
self._session = None

async def download(self, channel_id):
Expand Down

0 comments on commit fe1099f

Please sign in to comment.