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

Client disconnections: having a way to get back into the game #4

Open
4 tasks
darthwalsh opened this issue Jan 17, 2019 · 2 comments
Open
4 tasks

Client disconnections: having a way to get back into the game #4

darthwalsh opened this issue Jan 17, 2019 · 2 comments

Comments

@darthwalsh
Copy link
Owner

darthwalsh commented Jan 17, 2019

  • Every time input changes, try to refresh game
  • Lock name input on game start
  • Rename boxes to "Refresh Games" "Start New Game"
  • Replay game history using mock game instance
darthwalsh added a commit that referenced this issue Feb 1, 2019
If your client loses connection, rejoin as the same name and rejoin the game #4
Swapping in the new ws at the right moment is a little fragile
(it will crash if you send() a non-message while clinet is disconnected)
I was careful to preserve client setup of colors and help
darthwalsh added a commit that referenced this issue Apr 4, 2019
@darthwalsh
Copy link
Owner Author

Server crashed after disconnect -> reconnect?

/storage/emulated/0/Download/Austerity/server/connection.js:16
      choice: /** @param {string} data */ data => this.onChoice(data),
                                                       ^

TypeError: this.onChoice is not a function
    at choice (/storage/emulated/0/Download/Austerity/server/connection.js:16:56)
    at WebSocket.<anonymous> (/storage/emulated/0/Download/Austerity/server/connection.js:35:7)
    at WebSocket.onMessage (/storage/emulated/0/Download/Austerity/node_modules/ws/lib/event-target.js:199:18)
    at WebSocket.emit (events.js:327:22)
    at Receiver.receiverOnMessage (/storage/emulated/0/Download/Austerity/node_modules/ws/lib/websocket.js:1017:20)
    at Receiver.emit (events.js:315:20)
    at Receiver.dataMessage (/storage/emulated/0/Download/Austerity/node_modules/ws/lib/receiver.js:522:14)
    at Receiver.getData (/storage/emulated/0/Download/Austerity/node_modules/ws/lib/receiver.js:440:17)
    at Receiver.startLoop (/storage/emulated/0/Download/Austerity/node_modules/ws/lib/receiver.js:148:22)
    at Receiver._write (/storage/emulated/0/Download/Austerity/node_modules/ws/lib/receiver.js:83:10)

@darthwalsh
Copy link
Owner Author

After client disconnects, it takes a while for the server to see the disconnect...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant