[PR #4172] [MERGED] Time out stalled resource pack downloads #5458

Closed
opened 2026-11-03 05:12:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4172
Author: @DUzzL
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/issue-4168-pack-download-timeout


📝 Commits (1)

  • effec48 Time out stalled server resource pack downloads

📊 Changes

1 file changed (+52 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/server_packs/download.rs (+52 -1)

📄 Description

🤖 Opened by DUzzL's AI agent, not by DUzzL personally.

Refs #4168. This PR does not close the issue: the report has no logs, server details or reproduction, so the hang is not confirmed. This change is a defensive guard.

Cause (hypothesis): download_file in server_packs/download.rs built its ureq agent with no connect or read timeout. A server that accepts the connection and then goes silent would block the single download-queue thread, so the batch would never finish or fail.

Change: 30 s connect and read timeouts on the pack download agent only. A stalled request now returns an error, the batch reports the failure (batch.failed, download_failed in log.json) and the queue thread is released. The read timeout is per socket read, so a large pack on a slow link is not cut off while bytes keep arriving. Successful downloads are unchanged. Other HTTP clients are not touched.

Tested: cargo fmt --check and cargo clippy -p horizon-client --all-targets -- -D warnings pass. cargo test -p horizon-client --lib server_packs passes (12 of 12), including a new test with a silent server and a 300 ms timeout.

Not tested: no live server with a pack, so the reporter's hang is not reproduced. A slow server that trickles bytes would not be caught by this change. The UI side of batch.failed was not traced. tools/pr_ready.py not run.


🔄 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/4172 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/issue-4168-pack-download-timeout` --- ### 📝 Commits (1) - [`effec48`](https://github.com/horizon-rust/horizon/commit/effec4887d3240b032001767e01fb444b229fadc) Time out stalled server resource pack downloads ### 📊 Changes **1 file changed** (+52 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/server_packs/download.rs` (+52 -1) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent, not by DUzzL personally. Refs #4168. This PR does not close the issue: the report has no logs, server details or reproduction, so the hang is not confirmed. This change is a defensive guard. **Cause (hypothesis):** `download_file` in `server_packs/download.rs` built its `ureq` agent with no connect or read timeout. A server that accepts the connection and then goes silent would block the single download-queue thread, so the batch would never finish or fail. **Change:** 30 s connect and read timeouts on the pack download agent only. A stalled request now returns an error, the batch reports the failure (`batch.failed`, `download_failed` in `log.json`) and the queue thread is released. The read timeout is per socket read, so a large pack on a slow link is not cut off while bytes keep arriving. Successful downloads are unchanged. Other HTTP clients are not touched. **Tested:** `cargo fmt --check` and `cargo clippy -p horizon-client --all-targets -- -D warnings` pass. `cargo test -p horizon-client --lib server_packs` passes (12 of 12), including a new test with a silent server and a 300 ms timeout. **Not tested:** no live server with a pack, so the reporter's hang is not reproduced. A slow server that trickles bytes would not be caught by this change. The UI side of `batch.failed` was not traced. `tools/pr_ready.py` not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:43 +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#5458
No description provided.