Commit Graph

20 Commits

Author SHA1 Message Date
43370d7021 Merge pull request #11273 from bdach/duplicate-user-in-mp-room
Improve reliability of handling user joined messages
2020-12-24 14:31:44 +09:00
a71496bc4e Sanity check received user joined messages
While test failures fixed in 9843da5 were a shortcoming of the test,
they exposed a potential vulnerable point of the multiplayer client
logic. In case of unreliable message delivery it is not unreasonable
that duplicate messages might arrive, in which case the same scenario
that failed in the tests could crash the game.

To ensure that is not the case, explicitly screen each new joined user
against the room user list, to ensure that duplicates do not show up.
`UserLeft` is already tolerant in that respect (if a user is requested
to be removed twice by the server, the second removal just won't do
anything).
2020-12-23 21:00:49 +01:00
4296f61d6c Tidy up event flow of change settings call 2020-12-23 22:39:14 +09:00
94e4928c4b Bring back accidentally-removed license header 2020-12-23 11:27:15 +01:00
0ddcab574f Rename method to avoid weird code analysis rule 2020-12-23 17:14:58 +09:00
7cc38f03d1 Use extension method in all call sites of fire-and-forget async usage 2020-12-23 17:10:34 +09:00
569c4092ef Move notification to stateful client so it is only shown to the user from one location 2020-12-23 16:35:39 +09:00
00d50150de Ensure the current room is left at a mutliplayer client level on client disconnection 2020-12-23 16:35:39 +09:00
12876d7fb6 Add very basic error handling on ChangeSettings calls 2020-12-22 16:50:30 +09:00
b31f4e9e85 Merge branch 'stateful-multiplayer-client' into realtime-multiplayer-2 2020-12-21 00:41:42 +09:00
a893360c0e Reword comment 2020-12-21 00:41:14 +09:00
fdfe3c2b36 Merge branch 'realtime-ready-button' into realtime-multiplayer-2 2020-12-20 23:11:06 +09:00
9d13a5b06a Fix potential cross-thread list access 2020-12-20 22:53:07 +09:00
f876a329b1 Fire-and-forget leave-room request 2020-12-20 22:51:33 +09:00
0cf078562d Split method up and remove nested scheduling 2020-12-20 18:30:00 +09:00
508f73d949 Fix up comment 2020-12-20 18:25:54 +09:00
8b1f5ff492 Only instantiate ruleset once 2020-12-20 18:25:23 +09:00
724e4b83fe Fix nullability and remove early check 2020-12-20 18:21:03 +09:00
9ceb090f04 Fix ambiguous reference 2020-12-19 00:53:06 +09:00
ab9158c306 Add a stateful multiplayer client 2020-12-19 00:53:06 +09:00