Send password rejection before kicking client#1923
Merged
Flamefire merged 2 commits intoMay 7, 2026
Merged
Conversation
Flow86
previously approved these changes
May 1, 2026
Member
Flow86
left a comment
There was a problem hiding this comment.
This was probably a missed refactor thing, I remember that in an early version the KickPlayer flushed the queue of the disconnected player, but now its not doing that.
auto-merge was automatically disabled
May 7, 2026 11:18
Head branch was pushed to by a user without write access
36fad40 to
00c49eb
Compare
Contributor
Author
|
Added deterministic client-side coverage for the wrong-password response path. I avoided a socket timing test here; the new test verifies that receiving Validation:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WrongPasswordclient error path unchangedRoot cause
The server queued the password response with
sendMsgAsync()and immediately kicked the client afterwards. For wrong passwords this could close the connection before the queued"false"response was sent, so the client only observed a connection loss.This PR sends the
"false"password response synchronously before kicking the player. Successful password responses keep the existing async send path.The regression test intentionally avoids asserting real socket delivery-vs-disconnect timing, because that would be brittle. Instead, it verifies that receiving
GameMessage_Server_Password("false")triggers the existingClientError::WrongPasswordpath and stops the client.Validation
Test_networklocally with Visual Studio 2022 / DebugTest_network.exe --run_test=GameClientTests/ClientReportsWrongPasswordResponse --report_level=shortTest_network.exe --report_level=shortgit diff --checkFixes #1057