Skip to content

Commit 823d03f

Browse files
committed
Fix review comment of GitHub Copilot
1 parent 6b6c906 commit 823d03f

File tree

1 file changed

+6
-0
lines changed
  • nautilus_trader/adapters/dydx/websocket

1 file changed

+6
-0
lines changed

nautilus_trader/adapters/dydx/websocket/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,12 @@ async def unsubscribe_channel(
417417
return
418418

419419
if channel_id is None:
420+
if len(self._subscriptions[channel]) > 1:
421+
self._log.error(
422+
f"Cannot unsubscribe from {channel.value}: multiple subscriptions exist, specify channel_id",
423+
)
424+
return
425+
420426
self._subscriptions.pop(channel)
421427
else:
422428
self._subscriptions[channel].remove(channel_id)

0 commit comments

Comments
 (0)