# Restart interrupted update downloads after system wake \(\#60366\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7a7c3e1d2f03195c5fa19bc890da330ad7f3abef)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7a7c3e1d2f03195c5fa19bc890da330ad7f3abef

Requested commit: 7a7c3e1d2f03195c5fa19bc890da330ad7f3abef

Commit: 7a7c3e1d2f03195c5fa19bc890da330ad7f3abef

Tree: 3f738dba283458328e57d9597fa76554af86427a

Author: Anthony Eid

Committer: GitHub

## Message

```
Restart interrupted update downloads after system wake (#60366)

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
```

## Parents

- [fa852694f4767841d7039307929d00fcadfc7f7c](https://git.cafe/gitcafe/zed/commit/fa852694f4767841d7039307929d00fcadfc7f7c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7a7c3e1d2f03195c5fa19bc890da330ad7f3abef?format=markdown)
