Skip to content

Commit

Permalink
close sessions correcty
Browse files Browse the repository at this point in the history
  • Loading branch information
ferran committed Sep 12, 2018
1 parent feb6db7 commit d0f4630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guillotina_oauth/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,14 +566,14 @@ async def call_auth(self, url, params, headers={}, future=None,
# try to get new one and retry this...
await self.refresh_service_token()
await resp.release()
session.close()
await session.close()
return await self.call_auth(url, params, headers=headers,
future=future, retry=True, **kw)
else:
logger.error(
f'OAUTH SERVER ERROR({url}) {resp.status} {text}')
await resp.release()
session.close()
await session.close()
if future is not None:
future.set_result(result)
else:
Expand Down

0 comments on commit d0f4630

Please sign in to comment.