Open rm-rf-etc opened 3 years ago
There was a bug with continuation frames in 0.4.2 can up update to 0.4.3 and try it?
There was a bug with continuation frames in 0.4.2 can up update to 0.4.3 and try it?
Ya, I tried that version too, same result.
So, I'm NOT getting this with
Elixir 1.11.3 Erlang/OTP 23.2 WebSockex 0.4.3 & 0.4.2
I'll try to test with a different version of Erlang.
@Azolo that seems to be the fix! Thanks for the help. I had tried a number of versions of Erlang which are more recent than 21.3, but ran into trouble getting them to finish building, and also conflicts with wxmac. Fortunately it seems that all is working seamlessly with 23.2.
@Azolo @rm-rf-etc I am getting the same issue now, but the socket works for a random(I guess) amount of time before the connection goes silent. What I mean by random is that sometimes it happens within hours, sometimes it happens within a week. I am not sure how to debug this case specifically because it's not easily reproducible and logs show nothing.
edit: Since I am not sure why that happens and how would one go about debugging it, I was thinking of a fix and a simple hacky solution would be to send pings and look for pongs and restart the websockex process if the pong doesn't come back in some time(I see that restarting the server actually fixes things), so would you please be able to provide me with some guidance as to how would I proceed with that idea and is that something you reckon is possible at all?
Erlang version: 21.3 Elixir: 1.11.4 WebSockex: 0.4.2 Computer: MacBook Air (M1, 2020) OS: Big Sur v11.0.1
Subscribing to the WS feed from Binance results in a successful connection and the first 2 - 3 messages come in as expected, however, the connection then goes silent. I don't see any indication of the connection closing. I've enabled tracing using
debug: [:trace]
, but this also doesn't yield any clues (that I can see). Included is a minimal reproduction of the bug:I don't think the server is the cause of the problem, because it seems to work as expected when I test with
wscat
: