[PR #5277] [MERGED] Flush native mod messages before server shutdown #6182

Closed
opened 2026-11-03 06:15:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5277
Author: @arismoko
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: native-stop-flush


📝 Commits (2)

  • a5cca57 Flush native mod messages during server shutdown
  • 8d7ccfd Merge remote-tracking branch 'upstream/main' into native-stop-flush

📊 Changes

2 files changed (+3 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated.rs (+2 -1)
📝 crates/horizon-client/src/game/integrated.rs (+1 -0)

📄 Description

🤖 Opened by Aria's agent swarm, Dyna, not by Aria.

Fixes #5249.

Flush queued native mod messages after native_server_stopping and before players disconnect, for integrated and dedicated servers. Both paths reuse flush_native_net while the LAN host and players are still present.

In-game proof

On arch, a throwaway server native mod sent a message to every player from native_server_stopping. A client native mod logged that message. The LAN case used a server-thread world with a connected guest; the dedicated case used a connected Horizon client.

Path Before After
LAN Sends to owner and guest returned Ok; guest received nothing. Sends to owner and guest returned Ok; guest received the message.
Dedicated Send returned Ok; client received nothing. Send returned Ok; client received the message.

The proof builds used two test-only workarounds before #5251 merged: missing fields in Audio::share and the stale lan_send_particles call in creatures.rs. Neither workaround is in this branch. Readiness below ran after #5251, without workarounds.

The recommended end-to-end test route is horizon-machine-sample. It was not used because this check needs shutdown-message sender and receiver hooks.

Checks

pr_ready (tools/pr_ready.py --base 981693933 on arch, against 981693933 at 981693933, 3 min 32 s)

Check Result
Scope ✅ 2 files, +3 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 499 passed (43 s)
rustfmt ✅ (8 s)
clippy ✅ (1 min 30 s)
tests: horizon-client ✅ 1403 passed (1 min 9 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Dyna.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5277 **Author:** [@arismoko](https://github.com/arismoko) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `native-stop-flush` --- ### 📝 Commits (2) - [`a5cca57`](https://github.com/horizon-rust/horizon/commit/a5cca57316be61307fe9ac2be85e7812ab74ad7f) Flush native mod messages during server shutdown - [`8d7ccfd`](https://github.com/horizon-rust/horizon/commit/8d7ccfd5f48ef7f7c572558f419ab77afc622889) Merge remote-tracking branch 'upstream/main' into native-stop-flush ### 📊 Changes **2 files changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated.rs` (+2 -1) 📝 `crates/horizon-client/src/game/integrated.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by Aria's agent swarm, Dyna, not by Aria. Fixes #5249. Flush queued native mod messages after `native_server_stopping` and before players disconnect, for integrated and dedicated servers. Both paths reuse `flush_native_net` while the LAN host and players are still present. ## In-game proof On arch, a throwaway server native mod sent a message to every player from `native_server_stopping`. A client native mod logged that message. The LAN case used a server-thread world with a connected guest; the dedicated case used a connected Horizon client. | Path | Before | After | | --- | --- | --- | | LAN | Sends to owner and guest returned `Ok`; guest received nothing. | Sends to owner and guest returned `Ok`; guest received the message. | | Dedicated | Send returned `Ok`; client received nothing. | Send returned `Ok`; client received the message. | The proof builds used two test-only workarounds before #5251 merged: missing fields in `Audio::share` and the stale `lan_send_particles` call in `creatures.rs`. Neither workaround is in this branch. Readiness below ran after #5251, without workarounds. The recommended end-to-end test route is [horizon-machine-sample](https://github.com/arismoko/horizon-machine-sample). It was not used because this check needs shutdown-message sender and receiver hooks. ## Checks **pr_ready** (`tools/pr_ready.py --base 981693933` on arch, against 981693933 at 981693933, 3 min 32 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +3 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 499 passed (43 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (1 min 30 s) | | tests: horizon-client | ✅ 1403 passed (1 min 9 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with Dyna. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:15:38 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6182
No description provided.