-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket connections getting closed #2
Comments
Hi, to be honest I have no idea. It's a bit more alive at official fork here https://github.com/binance-exchange/go-binance/ - at least PR-wise. I haven't seen or used the APIs for a while now but looking at the error it looks that something with Websocket APIs really changed. I'll keep this open just in case I got back to this some day. |
Got that error, too. |
This error/issue happens when goroutine exitHandler sends message 1 second.
It works fine without "send" message |
@sinyakinilya How to fix? |
@rootpd @adrpino @sinyakinilya @betazoid |
I use conn.NextWriter instead of conn.WriteMessage to write msg and it works well.
|
Has anyone fixed this issue? I tried using the fix from @crlrfzj but it doesn't work. |
exitHandler in service_websocket.go is sending unsollicited text message to server every second. I do not see the need for sending this message every second. Binance api docs says :
But gorilla websocket handle PING/PONG frames on its own. Two solutions that worked for me :
|
Remove ticker is a better solution IMO. I created a PR for the fix |
Removed it. Update: i have special wss client for echange wss endpoints - https://github.com/filinvadim/stubborn. Welcome! |
I am attempting to run the example and when reading data from the websocket I get the following error:
Has the API changed in some way and some adaptations are required? I remember using this package months ago and worked like a bliss.
If you need help with it I'm willing to give a hand
The text was updated successfully, but these errors were encountered: