Skip to content
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

Serious problem where our clients are able to crash our server #549

Closed
akjt opened this issue Oct 19, 2022 · 1 comment · Fixed by #854
Closed

Serious problem where our clients are able to crash our server #549

akjt opened this issue Oct 19, 2022 · 1 comment · Fixed by #854
Labels
bug Something isn't working

Comments

@akjt
Copy link

akjt commented Oct 19, 2022

We got a websocket server . We run the server using the run_async method and it all works fine.

Occasionally, the client closes the connection (and is likely not doing it in a friendly way) , our server crashes with following message:

[Error ]: Worker Crash: An uncaught exception occured: remote endpoint: Transport endpoint is not connected

I can see from the code that Crow does handle such exception by just logging them and then continue , so why is it crashing al of a sudden.

I have discovered a few things. Firstly, it seems the problem can be reproduced by having the client disabling the wifi and enabling it again. This causes an uncleanly disconnection. What I am not sure about is why Crow's onclose function only is triggered when the client wifi is enabled - why cant crow detect the client is offline?

But that is not the real problem, the problem is the call conn.get_remote_ip()... That seems to behave very strangely on such scenarios. It throws and then segfaults. Not sure why your catch statements are not catching this.

@The-EDev The-EDev added the bug Something isn't working label Oct 30, 2022
@Maximsiv1410
Copy link

I have encountered the same behavior with onerror websocket handler which was called right after onclose.
Probably crow::websocket::connection object is not valid at that point...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants