Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/core/remoteFileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,12 @@ export class VirtualFileSystem extends vscode.Disposable {
})(),
};
this.isDirty = (update.op && update.op.length) ? true : false;
await this.socket.applyOtUpdate(doc._id, update);
// Skip the round-trip when the diff produced no operation (e.g. saving an
// unchanged document): the server has nothing to apply, answers with an error
// object and then force-disconnects the client 100ms later.
if (this.isDirty) {
await this.socket.applyOtUpdate(doc._id, update);
}
doc.localCache = mergeRes;
doc.remoteCache = mergeRes;
setTimeout(() => {
Expand Down