# Remove stale SSH LSP log entries after server restarts \(\#55299\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0b43719b8aaf8669b407d3df714425579cfc02c5

Requested commit: 0b43719b8aaf8669b407d3df714425579cfc02c5

Commit: 0b43719b8aaf8669b407d3df714425579cfc02c5

Tree: 5604ad4f4ccf1a665a1d901471d3cac40c4ca71f

Author: chenmi

Committer: GitHub

## Message

```
Remove stale SSH LSP log entries after server restarts (#55299)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #55287

This fixes the SSH remote case where restarting a language server left a
stale entry in the LSP Logs panel.

The root cause was that the remote client learned about the replacement
language server, but never received an explicit removal update for the
previous server id. As a result, the old status and log-store entry
remained visible even though only the new server continued producing
logs.

Tested with:
- `cargo test -p collab --test collab_tests
remote_editing_collaboration_tests::test_ssh_restarting_language_server_replaces_remote_status
-- --exact`

Release Notes:

- Fixed stale duplicate entries in the LSP Logs panel after restarting
an SSH remote language server.

Co-authored-by: Lukas Wirth <lukas@zed.dev>
```

## Parents

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

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