mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Merge pull request #166 from itsdeka/mattfix
Handle InvalidStatusCode exception
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
1.2.2
|
||||
-) WS bugfix (exception InvalidStatusCode not handled)
|
||||
|
||||
1.2.1
|
||||
-) Added orderbook implementation example (ws)
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
This module contains the current version of the bfxapi lib
|
||||
"""
|
||||
|
||||
__version__ = '1.2.1'
|
||||
__version__ = '1.2.2'
|
||||
|
||||
@@ -13,7 +13,7 @@ from pyee import AsyncIOEventEmitter
|
||||
from ..utils.custom_logger import CustomLogger
|
||||
|
||||
# websocket exceptions
|
||||
from websockets.exceptions import ConnectionClosed
|
||||
from websockets.exceptions import ConnectionClosed, InvalidStatusCode
|
||||
|
||||
class AuthError(Exception):
|
||||
"""
|
||||
@@ -141,7 +141,7 @@ class GenericWebsocket:
|
||||
await asyncio.sleep(0)
|
||||
message = await websocket.recv()
|
||||
await self.on_message(sId, message)
|
||||
except (ConnectionClosed, socket.error) as e:
|
||||
except (ConnectionClosed, socket.error, InvalidStatusCode) as e:
|
||||
self.sockets[sId].set_disconnected()
|
||||
if self.sockets[sId].isAuthenticated:
|
||||
self.sockets[sId].set_unauthenticated()
|
||||
|
||||
2
setup.py
2
setup.py
@@ -11,7 +11,7 @@ from os import path
|
||||
here = path.abspath(path.dirname(__file__))
|
||||
setup(
|
||||
name='bitfinex-api-py',
|
||||
version='1.2.1',
|
||||
version='1.2.2',
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user