Attachments (2)
Change History (9)
comment:1 by , 10 years ago
Owner: | set to |
---|
by , 10 years ago
Attachment: | sendNetworkMessagesAtGameEnd_v1.patch added |
---|
comment:2 by , 10 years ago
Keywords: | patch review added |
---|---|
Summary: | EndGame() does not send pending messages of turn to server → [PATCH] EndGame() does not send pending messages of turn to server |
by , 10 years ago
Attachment: | sendNetworkMessagesAtGameEnd_v2.patch added |
---|
Moved some function calls to destructor. (Thx to Josh)
comment:4 by , 10 years ago
Keywords: | multiplayer added; MP patch review removed |
---|---|
Milestone: | Backlog → Alpha 16 |
Thanks for the patch, I only made some minor grammatical corrections to the comments.
comment:6 by , 6 years ago
Description: | modified (diff) |
---|
- Bug: This commit forgot that the simulation command may only be flushed with
CEndCommandBatchMessage
for clients that finished the loading screen and rejoin process, triggering a NetServer FSM error otherwise, see Phab:rP14732 and #4594.
- The reported problem was never solved and cannot be solved! I leave it on the milestone for historic reasons, but it should have been an Invalid ticket.
Evidence:
- Phab:D1557:
According to testing over there, the
CEndCommandBatchMessage
is received by the NetServer in 1 out of 10 tests with 1 or 2 clients total when ending that client with alt+f4.
- Phab:rP15106 removing
EndGame
call:
Phab:rP14732 was a preparation of having players resign just before leaving the game: #2373. Phab:rP14772 implemented a resign question, but still ended the game instantly after attempting to send the command.
Phab:rP15106 changed that clicking resign after confirming the leave doesn't actually end the game anymore after trying to post the simulation command, but to post the simulation command and then don't do anything (rather than eventually exiting).
- Testing
for the reported issue specifically Alpha 23.
Add
leaveGame(false);
toresignGame
and removeresignGame
fromleaveGame
. Click on exit, confirm to resign and you're most likely out of the game without having sent the defeat message.
Also, at some later point a question was added to ask to leave after having been defeated, which in case of resigning through the exit button is duplicate: #5204 (but I don't know the culprit commit).
Also notice that there's the problem that the defeat will never be confirmed during pause. That can't be solved unless testing if the server confirmed the receive of these commands (which it doesn't until the next turn currently.)
Ends sending the messages for the current turn and flushs them when the game is ended.