control-net / libre-cards-against-humanity

Free and Open Source implementation of Cards against humanity using Signal R.
GNU General Public License v3.0
6 stars 9 forks source link

🔥 Handle unexpected disconnects #32

Open petrspelos opened 3 years ago

petrspelos commented 3 years ago

Summary

At the moment, if a player gets disconnected, there is no way of rejoining the session. We should probably have a way of making sure current connections are timed-out correctly.

After a number of players leave, there should be an exception thrown server-side. That should be a good first fix for this issue.

Alex-451 commented 3 years ago

I would like to try this one (I never really worked with SignalR though so might take a while)

petrspelos commented 3 years ago

Alrighty, good luck. ☺️

Alex-451 commented 3 years ago

Notes: https://docs.microsoft.com/en-us/aspnet/core/signalr/hubs?view=aspnetcore-6.0#handle-events-for-a-connection https://docs.microsoft.com/en-us/aspnet/core/signalr/dotnet-client?view=aspnetcore-6.0&tabs=visual-studio#automatically-reconnect