Skip to content

Restart interrupted update downloads after system wake#60366

Open
Anthony-Eid wants to merge 1 commit into
mainfrom
restart-updates-after-system-wake
Open

Restart interrupted update downloads after system wake#60366
Anthony-Eid wants to merge 1 commit into
mainfrom
restart-updates-after-system-wake

Conversation

@Anthony-Eid

@Anthony-Eid Anthony-Eid commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #60301, which was reverted in #60321.

I removed the reqwest part of the fix because it crashed. reqwest's read_timeout relies on a tokio timer, but Zed polls HTTP responses on gpui's executor instead of a tokio runtime, so it panicked when the response body was awaited. I'll follow up later by patching our reqwest fork to support the poll behavior we wanted.

This fixes the download being stalled since we restart it when the system wakes.

I also changed App::on_system_wake to return a gpui::Subscription to be consistent with gpui's other on-system-event handlers like on_keyboard_layout_change and on_thermal_state_change.

Release Notes:

  • Fixed Zed update downloads stalling after the system wakes from sleep

Promote App::on_system_wake to a multi-subscriber Subscription API (matching
on_keyboard_layout_change / on_thermal_state_change) and use it in the
auto-updater to cancel and restart a check or download that was interrupted by
sleep, instead of letting it stall on a dead connection.

This intentionally omits the reqwest read_timeout change from the reverted
PR (#60301), which panicked because reqwest arms a tokio timer while polling
the response body outside of any tokio runtime. A runtime-agnostic idle
timeout will follow in a separate PR.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jul 3, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant