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

Queue up messages if the websocket is not connected. #15

Open
FireFlyForLife opened this issue Aug 3, 2019 · 0 comments
Open

Queue up messages if the websocket is not connected. #15

FireFlyForLife opened this issue Aug 3, 2019 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@FireFlyForLife
Copy link
Owner

The problem is that I first connect to the match, when that succeeds I start a websocket connection. If some message gets send between being join and being websocket connected, the message is voided.

This is a tricky one, because not all messages should be queued, because you receive the full state.

Two options:

  • Change the order of things, first you join, then I do the websocket handshake then I create a seperate request to get the match state.
  • I could create the message queue and clear it when a new gamestate is being requested. This wayy if you reconnect you will be up to date, but you won't redo messages which were intended from the last state you had.
@FireFlyForLife FireFlyForLife added this to the Polishing milestone Aug 3, 2019
@FireFlyForLife FireFlyForLife added the bug Something isn't working label Aug 3, 2019
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

1 participant