# Forget which buffers were shared when host reconnects · gitcafe/zed

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

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

Visibility: public

Requested revision: d7f56d6126fd93cfa59429894446b348a9dec6f0

Requested commit: d7f56d6126fd93cfa59429894446b348a9dec6f0

Commit: d7f56d6126fd93cfa59429894446b348a9dec6f0

Tree: d081b338b7b97eb7a61452f2f95bbab6182c48d9

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Forget which buffers were shared when host reconnects

This fixes a bug where the host would momentarily disconnect and the guest
would close and reopen the project. This would cause the host to not observe
the guest closing the project. When the guest tried to open one of the
buffers opened prior to closing the project, the host would not send them the
buffer state because it would still remember that the buffer was shared.

The `shared_buffers` map is now cleared when the host reconnects and will slowly
get re-filled as guests issue `SynchronizeBuffers` requests.

```

## Parents

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

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