mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
Avoid p_sub not initialized issue
Thanks to @nkasimova (https://github.com/bitfinexcom/bitfinex-api-py/pull/170)
This commit is contained in:
@@ -62,6 +62,7 @@ class SubscriptionManager:
|
|||||||
channel = raw_ws_data.get("channel")
|
channel = raw_ws_data.get("channel")
|
||||||
chan_id = raw_ws_data.get("chanId")
|
chan_id = raw_ws_data.get("chanId")
|
||||||
key = raw_ws_data.get("key", None)
|
key = raw_ws_data.get("key", None)
|
||||||
|
p_sub = None
|
||||||
get_key = "{}_{}".format(channel, key or symbol)
|
get_key = "{}_{}".format(channel, key or symbol)
|
||||||
if chan_id in self.subscriptions_chanid:
|
if chan_id in self.subscriptions_chanid:
|
||||||
# subscription has already existed in the past
|
# subscription has already existed in the past
|
||||||
|
|||||||
Reference in New Issue
Block a user