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

Handle abrupt player disconnection #5

Open
pierd opened this issue Jul 20, 2023 · 3 comments
Open

Handle abrupt player disconnection #5

pierd opened this issue Jul 20, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@pierd
Copy link
Collaborator

pierd commented Jul 20, 2023

Explicit disconnects are handled properly but if a connection times out or ambient is simply killed then the player is still seen as connected.

Add an explicit player disconnected callback
OR
Add handling inside proxied connection and report an error there to let Ambient handle disconnection

@pierd pierd added the bug Something isn't working label Jul 20, 2023
@pierd pierd self-assigned this Jul 20, 2023
@ten3roberts
Copy link
Contributor

You could have the proxy send a Disconnect frame on behalf of the timed out user

See: https://github.com/AmbientRun/Ambient/blob/f4e68976e77dac06268883acad0bcd82aaf7f493/crates/network/src/proto/mod.rs#L10

@ten3roberts
Copy link
Contributor

Feel free to add more variants to that enum if you need, it will be backwards compatible anyway as long as they are added after the existing variants

@pierd
Copy link
Collaborator Author

pierd commented Jul 20, 2023

I'd prefer proxy to be more transparent and not to rely too much on Ambient protocol.

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

No branches or pull requests

2 participants