bitfinexcom / bitfinex-api-go

BITFINEX Go trading API - Bitcoin, Litecoin, and Ether exchange
https://www.bitfinex.com/
MIT License
303 stars 222 forks source link

do not reconnect automatically once got InfoEvent : "Stopping. Please try to reconnect" #187

Closed gpmn closed 4 years ago

gpmn commented 4 years ago

{Version:0 ServerId: Platform:{Status:0} Code:20051 Msg:Stopping. Please try to reconnect}

Issue type

Brief description

once the websocket received an InfoEvent like this : {Version:0 ServerId: Platform:{Status:0} Code:20051 Msg:Stopping. Please try to reconnect} then the connection lost, but it do not reconnect automatically. Any sugguestion?

Steps to reproduce

Additional Notes:
gpmn commented 4 years ago

TOOOOOOOOOOOOOOOOOO MANY BUGS in recent version, it is so hard to blame ..................

BUG太多,无力吐槽!!!

gpmn commented 4 years ago

It seems that the server will disconnect proactively once websocket connected, before any subscription made.

At the moment, your heratbeat checking based on subscription not work yet. Then the connection is keeping closed, and can not reconnect automatically.

Dame your upgrading without test with sdk!!!!

JacobPlaster commented 4 years ago

Hey @gpmn illl try to reproduce these issues now. Thanks for raising them

JacobPlaster commented 4 years ago

Ok I did manage to find the bug that you are referring to, it seems like it only causes a problem when the socket has no subscriptions (like you said) and is not authenticated. Ill create a fix for this now.

TOOOOOOOOOOOOOOOOOO MANY BUGS in recent version

We had to completely rework the websocket implementation to include a multiplexer so if there are any other bugs that you know of please let me know now.

JacobPlaster commented 4 years ago

Update, all problems stated above are fixed. Im just finishing a new feature before I open the PR

JacobPlaster commented 4 years ago

It seems that the server will disconnect proactively once websocket connected, before any subscription

This bug has always been there, the only difference is the new version wasnt reconnecting afterwards. Ive made the fix to reconnect and also the original proactive disconnect

JacobPlaster commented 4 years ago

fixed in https://github.com/bitfinexcom/bitfinex-api-go/pull/189

gpmn commented 4 years ago

OK, thank you!

but I'm a little afraid to use the latest version. I will use the old one, since it has been tested, should work well for me for a while.

Anyway, thank you very much!