ShadowJonathan / eduP2P

An authenticated peer-to-peer network overlay
MIT License
3 stars 1 forks source link

Possible issue: Racing between Session logon and connecting with other sessions #37

Open ShadowJonathan opened 4 months ago

ShadowJonathan commented 4 months ago

Description

3 describes a scenario where the client logs onto a server, and tries to get its approval to a logon request, together with the currently active sessions.

If the server accepts the logon and then asynchronously sends session updates to every client, we could end up in a scenario where the client tries to connect to another device while that device doesn't know about that session, rejecting messages for a split second.

To prevent this, we could possibly have the coordination server distribute the websocket session updates, and wait for an acknowledgement (which can be tied to each client's own internal updating mechanism), up to 10 seconds, before it sends the reply anyways?