mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-18 14:24:21 +01:00
Fix low latency bug in public method BfxWebSocketBucket::start.
This commit is contained in:
@@ -67,8 +67,9 @@ class BfxWebSocketBucket(Connection):
|
||||
|
||||
if isinstance(message, list):
|
||||
if (chan_id := cast(int, message[0])) and \
|
||||
(message[1] != Connection._HEARTBEAT):
|
||||
self.__handler.handle(self.__subscriptions[chan_id], message[1:])
|
||||
(subscription := self.__subscriptions.get(chan_id)) and \
|
||||
(message[1] != Connection._HEARTBEAT):
|
||||
self.__handler.handle(subscription, message[1:])
|
||||
|
||||
def __on_subscribed(self, message: Dict[str, Any]) -> None:
|
||||
chan_id = cast(int, message["chan_id"])
|
||||
|
||||
Reference in New Issue
Block a user