-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
:gun_http.ws_send/6 is undefined or private #297
Comments
There's no ping in HTTP so that might be why this happens. How do you send pings? |
@essen thsi is the code I have that does it. the traceback is non exsitant but this is the only place I send {:ping, "ping"} so I assume this is where it slips into the library
and this is occurring over a websocket |
The 6-arity is an internal call that results from yours. What might be a bug is if you try to send a Websocket ping when the connection is using HTTP, it tries to call a function that does not exist instead of rejecting the call. |
hmm ok so what it uses depends conditionally on if the websocket handshake is established? |
ok so I added a guard clause that prevents the ws_send from sending the ping unless the status of the websocket is successfully upgraded. will let you know if it works. Thankyou for the insight! |
Cheers. If that's it please leave the ticket open and I'll make sure Gun avoids this crash. |
unfortunately I am still seeing it after the guard clause was added. |
I got the same crashes. It happens when |
Good point. Should handle that better. |
version: 2.0
I'm getting a crash in our gun cluster system. seems to happen only when we send a ping
at no point in my own code am I calling a 6 arrity version of ws_send so I'm at a loss. I can only conclude something is causing it to call some old code that calls a function that does't exist in this case?
The text was updated successfully, but these errors were encountered: