Skip to content

Reload Part 2 | no autokick when /server restart (headless) #3278

Open
tillpp wants to merge 112 commits into
PixelGuys:masterfrom
tillpp:reload2
Open

Reload Part 2 | no autokick when /server restart (headless) #3278
tillpp wants to merge 112 commits into
PixelGuys:masterfrom
tillpp:reload2

Conversation

@tillpp

@tillpp tillpp commented Jun 22, 2026

Copy link
Copy Markdown
Contributor
2026-06-23.15-31-30.mp4

TODOs:

  • refCount of User doesnt hit zero when leaving the server?!
  • handle old packets not being received after restart

Comment thread src/network/protocols.zig Outdated
Comment thread src/network/protocols.zig Outdated
Comment thread src/network/protocols.zig Outdated
Comment thread src/server/server.zig Outdated
Comment thread src/server/server.zig Outdated
Comment thread src/game.zig Outdated
Comment thread src/game.zig
Comment thread src/main.zig Outdated
Comment thread src/network.zig Outdated
Comment thread src/network.zig
tillpp and others added 11 commits June 29, 2026 20:35
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Comment thread src/network.zig
Comment thread src/network.zig
Comment thread src/game.zig Outdated
Comment thread src/server/server.zig
connectionManager.pause();
main.threadPool.clear();

connectionManager.pause();

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.

Doing this after clear adds a race condition, since new threadpool tasks may be added by connected players.
Why does player pausing need to happen after threadpool clear?

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 dont remember all interconnections, but user.pause does deinit stuff, that is still needed by threads on the main.threadPool

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.

we could do main.threadPool.clear twice, one before and after

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.

or i move it where i moved it now

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.

I'm not happy with the outcome here, and I think it would be best to use a more robust mechanism, as proposed in #3321.

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.

3 participants