Skip to content

Commit a2187ed

Browse files
author
Shlomi Kushchi
authored
set self._retries = 0 when authorized
1 parent ee5ebc1 commit a2187ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

alpaca_trade_api/stream2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ async def _connect(self):
4646
(f"Invalid Alpaca API credentials, Failed to "
4747
f"authenticate: {msg}")
4848
)
49+
else:
50+
self._retries = 0
4951
elif msg.get('data', {}).get('error'):
5052
raise Exception(f"Error while connecting to {self._endpoint}:"
5153
f"{msg.get('data').get('error')}")

0 commit comments

Comments
 (0)