Match guest's reported buffers on host when synchronizing after reconnect

If the host thinks a guest has a buffer that they don't have, the host won't
send it to them when they attempt to open it the next time. This can happen
if the guest disconnected before they received the host's response to an
initial open buffer request.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-01-06 11:48:34 -07:00
parent 0d31c8c1c8
commit 585c23e9f6

View file

@ -5181,6 +5181,7 @@ impl Project {
return;
};
this.shared_buffers.entry(guest_id).or_default().clear();
for buffer in envelope.payload.buffers {
let buffer_id = buffer.id;
let remote_version = language::proto::deserialize_version(buffer.version);