Skip to content

Ignore non expected confirm of command on client side - #3497

Open
Wunka wants to merge 2 commits into
PixelGuys:masterfrom
Wunka:IgnoreNonExpectedConfirm
Open

Ignore non expected confirm of command on client side#3497
Wunka wants to merge 2 commits into
PixelGuys:masterfrom
Wunka:IgnoreNonExpectedConfirm

Conversation

@Wunka

@Wunka Wunka commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Normally this shouldn't happen, but I also see no reason to crash a client because of this

@Wunka Wunka moved this to Easy to Review in PRs to review Aug 7, 2026
Comment thread src/sync.zig
if (commands.popFront()) |cmd| {
try cmd.finalize(main.globalAllocator, .client, reader);
} else {
std.log.err("Received unexpected confirmation sync", .{});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should return an error. Clients that are out of sync with the server should disconnect.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

returning an error is currently not hooked up to a disconnect on client side as it seems. I tried return error.Invalid and it would just ignore it then instead of doing a disconnect

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell it should be hooked up. Could you investigate this further?

@IntegratedQuantum IntegratedQuantum moved this from Easy to Review to In review in PRs to review Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants