Skip to content

Commit

Permalink
reconnect fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Feb 10, 2023
1 parent 6b57f82 commit 839626b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion siridb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version_info__ = (2, 1, 1)
__version_info__ = (2, 1, 2)
__version__ = '.'.join(map(str, __version_info__))
__maintainer__ = 'Jeroen van der Heijden'
__email__ = '[email protected]'
5 changes: 3 additions & 2 deletions siridb/connector/lib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,9 @@ async def _ensure_write(
if retry > self.MAX_WRITE_RETRY:
raise e
if retry % self.RECONNECT_ATTEMPT == 0:
self._reconnect()
await asyncio.sleep(1.0)
await self._reconnect()
else:
await asyncio.sleep(1.0)
continue

return res

0 comments on commit 839626b

Please sign in to comment.