Skip to content

Commit

Permalink
Always reset instance_token after removal
Browse files Browse the repository at this point in the history
`instance_token` should be reset regardless of which attempt it is.
  • Loading branch information
Noctem committed Apr 19, 2017
1 parent c1b4b2c commit 029fcbe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aiopogo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'aiopogo'
__version__ = '1.8.1'
__version__ = '1.8.2'
__author__ = 'David Christenson'
__license__ = 'MIT License'
__copyright__ = 'Copyright (c) 2017 David Christenson <https://github.com/Noctem>'
Expand Down
2 changes: 1 addition & 1 deletion aiopogo/hash_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ async def hash(self, timestamp, latitude, longitude, accuracy, authticket, sessi
if self.multi:
self.log.warning('{:.10}... expired, removing from rotation.'.format(self.instance_token))
self.remove_token(self.instance_token)
self.instance_token = self.auth_token
if attempt < 1:
self.instance_token = self.auth_token
headers = {'X-AuthToken': self.instance_token}
continue
return await self.hash(timestamp, latitude, longitude, accuracy, authticket, sessiondata, requests)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
author='David Christenson',
author_email='[email protected]',
description='Asynchronous Pokemon API lib',
version='1.8.1',
version='1.8.2',
url='https://github.com/Noctem/aiopogo',
packages=find_packages(),
install_requires=[
Expand Down

0 comments on commit 029fcbe

Please sign in to comment.