Petersoj / alpaca-java

A Java API for Alpaca, the commission free, algo friendly, stock trading broker. https://alpaca.markets
https://petersoj.github.io/alpaca-java/
MIT License
197 stars 82 forks source link

Reconnect when a 1006 occurs #70

Closed jetonbacaj closed 3 years ago

Petersoj commented 3 years ago

I've modified this to be more in line with the previous subscription logic. If you could test/review this on Monday (try to reproduce a disconnect), that'd be great.

jetonbacaj commented 3 years ago

I've modified this to be more in line with the previous subscription logic. If you could test/review this on Monday (try to reproduce a disconnect), that'd be great.

@Petersoj My apologies for not trying this out sooner - I was stuck with my initial hack.

I have been running it today, and it seems to be working fine. I even took out the Thread.sleep(3000), since there is no need for that.