if max_retries == 0 continue forever

This commit is contained in:
itsdeka
2021-08-06 13:45:28 +02:00
parent 62501edfa0
commit 4e86eede41
3 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
1.1.16
-) Implemented Margin Info (rest)
-) Implemented claim position (rest)
-) When max_retries == 0 continue forever to retry (websocket)
1.1.15
-) Added 'ids' parameter to get_order_history()

View File

@@ -128,7 +128,7 @@ class GenericWebsocket:
s = Socket(sId)
self.sockets[sId] = s
loop = asyncio.get_event_loop()
while retries < self.max_retries and self.attempt_retry:
while self.max_retries == 0 or (retries < self.max_retries and self.attempt_retry):
try:
async with websockets.connect(self.host) as websocket:
self.sockets[sId].set_websocket(websocket)

View File

@@ -11,7 +11,7 @@ from os import path
here = path.abspath(path.dirname(__file__))
setup(
name='bitfinex-api-py',
version='1.1.15',
version='1.1.16',
description='Official Bitfinex Python API',
long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction',
long_description_content_type='text/markdown',