Skip to content

Commit 9fbbfb9

Browse files
committed
fix websocket connection issue
1 parent f1209dc commit 9fbbfb9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "deltadefi"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
description = "Python SDK for DeltaDeFi protocol."
55
readme = "README.md"
66
requires-python = ">3.11,<4.0.0"

src/deltadefi/clients/websocket.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,8 @@ async def _reconnect(self) -> None:
187187
# In a more complex implementation, you'd want to handle multiple concurrent subscriptions
188188
if self.subscriptions:
189189
first_sub = next(iter(self.subscriptions.values()))
190-
if first_sub.get("type") == "trade":
191-
await self.connect(first_sub["endpoint"])
192-
else:
193-
await self.connect()
190+
# Always use the stored endpoint for reconnection
191+
await self.connect(first_sub["endpoint"])
194192
else:
195193
await self.connect()
196194

0 commit comments

Comments
 (0)