From 4e86eede4125cb0a997df23acc9f9686a364e7f5 Mon Sep 17 00:00:00 2001 From: itsdeka Date: Fri, 6 Aug 2021 13:45:28 +0200 Subject: [PATCH 1/2] if max_retries == 0 continue forever --- CHANGELOG | 1 + bfxapi/websockets/generic_websocket.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 836ffc8..b1a45f8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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() diff --git a/bfxapi/websockets/generic_websocket.py b/bfxapi/websockets/generic_websocket.py index afec9cc..80d19c3 100644 --- a/bfxapi/websockets/generic_websocket.py +++ b/bfxapi/websockets/generic_websocket.py @@ -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) diff --git a/setup.py b/setup.py index c638f7a..8bc5e46 100644 --- a/setup.py +++ b/setup.py @@ -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', From 30b46b1ebe75cd3ca73091bb321881d5849df6f6 Mon Sep 17 00:00:00 2001 From: itsdeka Date: Thu, 12 Aug 2021 16:31:54 +0200 Subject: [PATCH 2/2] semver adjustment --- CHANGELOG | 2 +- bfxapi/version.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b1a45f8..74e320e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -1.1.16 +1.2.0 -) Implemented Margin Info (rest) -) Implemented claim position (rest) -) When max_retries == 0 continue forever to retry (websocket) diff --git a/bfxapi/version.py b/bfxapi/version.py index 3bf093c..f46ec8e 100644 --- a/bfxapi/version.py +++ b/bfxapi/version.py @@ -2,4 +2,4 @@ This module contains the current version of the bfxapi lib """ -__version__ = '1.1.16' +__version__ = '1.2.0' diff --git a/setup.py b/setup.py index 8bc5e46..4a50b95 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from os import path here = path.abspath(path.dirname(__file__)) setup( name='bitfinex-api-py', - version='1.1.16', + version='1.2.0', 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',