Skip to content

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

Merged
IntegratedQuantum merged 4 commits into
PixelGuys:masterfrom
Wunka:IgnoreNonExpectedConfirm
Aug 30, 2026
Merged

Ignore non expected confirm of command on client side#3497
IntegratedQuantum merged 4 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 Outdated
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?

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.

I don't know what I tested 3 weeks ago, but return error.Invalid now works as expected

@IntegratedQuantum IntegratedQuantum moved this from Easy to Review to In review in PRs to review Aug 8, 2026
@IntegratedQuantum
IntegratedQuantum merged commit 39d64c5 into PixelGuys:master Aug 30, 2026
1 check passed
@Wunka
Wunka deleted the IgnoreNonExpectedConfirm branch August 30, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants