[PR #171] [MERGED] Fix LAN shutdown when leaving a singleplayer world #2373

Closed
opened 2026-11-02 15:55:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/171
Author: @rdbtCVS
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ludovic111

Base: main ← Head: t3code/disable-lan-on-leave


📝 Commits (1)

  • 1b1e129 Fix LAN shutdown when leaving a singleplayer world

📊 Changes

2 files changed (+146 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+2 -0)
➕ tools/test_lan_lifecycle.py (+144 -0)

📄 Description

Leaving a singleplayer world after opening it to LAN kept the host alive on the title screen, so it continued accepting connections and broadcasting discovery announcements. Call the existing LAN cleanup when returning to the title screen and when exiting the application, saving guests and disconnecting them before dropping the host.

Add a disposable-world regression that uses the real pause menu, checks that the listener closes and announcements stop, and verifies that reopening stays private and can host again on the same port. The regression failed before the fix and passes afterward.

Validation:

  • LAN lifecycle regression passed under Xvfb with prepared resources.
  • cargo test --locked --workspace: 790 passed, 1 ignored, including both LAN protocol integration tests.
  • Python tooling suite: 173 passed.
  • Formatting and public-tree checks passed.
  • Strict workspace Clippy is blocked by 9 existing errors in horizon-world; those files are identical to upstream main.

🔄 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/171 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3code/disable-lan-on-leave` --- ### 📝 Commits (1) - [`1b1e129`](https://github.com/horizon-rust/horizon/commit/1b1e1291122ee0146c59938901196b93462c75b9) Fix LAN shutdown when leaving a singleplayer world ### 📊 Changes **2 files changed** (+146 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+2 -0) ➕ `tools/test_lan_lifecycle.py` (+144 -0) </details> ### 📄 Description Leaving a singleplayer world after opening it to LAN kept the host alive on the title screen, so it continued accepting connections and broadcasting discovery announcements. Call the existing LAN cleanup when returning to the title screen and when exiting the application, saving guests and disconnecting them before dropping the host. Add a disposable-world regression that uses the real pause menu, checks that the listener closes and announcements stop, and verifies that reopening stays private and can host again on the same port. The regression failed before the fix and passes afterward. Validation: - LAN lifecycle regression passed under Xvfb with prepared resources. - `cargo test --locked --workspace`: 790 passed, 1 ignored, including both LAN protocol integration tests. - Python tooling suite: 173 passed. - Formatting and public-tree checks passed. - Strict workspace Clippy is blocked by 9 existing errors in `horizon-world`; those files are identical to upstream `main`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:25 +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#2373
No description provided.