mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
websocket: add write lock when sending
This commit is contained in:
committed by
Jacob Plaster
parent
7db6b5d73f
commit
d54c0d2391
@@ -54,13 +54,13 @@ class Subscription:
|
||||
if not self.is_subscribed():
|
||||
raise Exception("Subscription is not subscribed to websocket")
|
||||
payload = {'event': 'unsubscribe', 'chanId': self.chan_id}
|
||||
await self.socket.ws.send(json.dumps(payload))
|
||||
await self.socket.send(json.dumps(payload))
|
||||
|
||||
async def subscribe(self):
|
||||
"""
|
||||
Send a subscription request to the bitfinex socket
|
||||
"""
|
||||
await self.socket.ws.send(json.dumps(self._get_send_payload()))
|
||||
await self.socket.send(json.dumps(self._get_send_payload()))
|
||||
|
||||
def confirm_unsubscribe(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user