# Properly notify all language server worktree trust listeners \(\#46613\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 38fc4eaf4445a8c1e5f015c281e50b4dd6c0c9c6

Requested commit: 38fc4eaf4445a8c1e5f015c281e50b4dd6c0c9c6

Commit: 38fc4eaf4445a8c1e5f015c281e50b4dd6c0c9c6

Tree: 206b7b7d2c8093f8472ae3623da61ad1b8677be9

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Properly notify all language server worktree trust listeners (#46613)

Closes https://github.com/zed-industries/zed/issues/46590


https://github.com/user-attachments/assets/8464a3b6-9258-4d15-9168-56178bf46437

`use smol::channel::{Receiver, Sender};` do not propagate the value
change to all receivers, hence only one language server received the
"worktree trusted" message.
The fix uses `watch` kind of channels instead, and cleans up its state
more eager to rely on the sender drop as another form of notification.

Release Notes:

- Fixed groups of language servers not starting after worktree trust
approval
```

## Parents

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

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