Skip to content

Commit

Permalink
Pass timeout to async_refresh_token
Browse files Browse the repository at this point in the history
  • Loading branch information
niklascp committed Feb 6, 2020
1 parent 2ab11bd commit 89a3bd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions connectedcars/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def async_query(self, query, timeout = API_DEFAULT_TIMEOUT):
try:
async with aiohttp.ClientSession() as session:
if self.token is None:
await self.async_refresh_token(session)
await self.async_refresh_token(session, timeout)

while self.retry < 2:

Expand All @@ -91,7 +91,7 @@ async def async_query(self, query, timeout = API_DEFAULT_TIMEOUT):

if response.status == 401:
self.logger.debug(await response.text())
await self.async_refresh_token(session)
await self.async_refresh_token(session, timeout)
self.retry = self.retry + 1
continue
elif response.status == 200:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
setup(
name = 'connectedcars',
packages = ['connectedcars'],
version = '0.1.2',
version = '0.1.3',
license = 'MIT',
description = 'Wrapper for access the Connected Cars API - an AVL/data collection service installed in most new danish vehicles from Audi, Volkswagen, Skoda and SEAT.',
long_description = long_description,
Expand Down

0 comments on commit 89a3bd2

Please sign in to comment.