# linux: Fix reload hangs for several minutes \(\#24882\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5c5caf1ffe279256a43982af60c473b9bbfd858a

Requested commit: 5c5caf1ffe279256a43982af60c473b9bbfd858a

Commit: 5c5caf1ffe279256a43982af60c473b9bbfd858a

Tree: 60e85b15272969786e78913823731776a8997a59

Author: smit

Committer: GitHub

## Message

```
linux: Fix reload hangs for several minutes (#24882)

Closes #22666

This PR fixes the long wait time to open Zed (2 mins in my case) after
reloading on Linux.

This bug fix is funny:

1. We were using TCP for Zed instances to talk to each other. Reload was
broken here too due to TCP connections not being killed on time.
2. [#11488](https://github.com/zed-industries/zed/pull/11488) PR fixed
the TCP connection issue by adding a wait until it gets killed. I
suppose at that time, this wait time was small.
3. Later, we changed how Zed talks to each other in
[#11585](https://github.com/zed-industries/zed/pull/11585) by using
Datagram and removing TCP. The new approach simply uses a `.sock` file
and a file descriptor to check if some program is listening to it.
4. TCP check is now unnecessary, and it still wait for a long time (I
suppose, TIME_WAIT time, don't quote me on this), even though we don’t
use TCP anymore for this.

This PR just removes that unnecessary TCP wait.

Release Notes:

- Fixed issue where reload hangs for several minutes on Linux.
```

## Parents

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

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