浏览代码

Fix bug that was causing clients to disconnect

Eric Zhang 4 年之前
父节点
当前提交
7b00ffdd85
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/rustpad.ts

+ 1 - 1
src/rustpad.ts

@@ -97,13 +97,13 @@ class Rustpad {
       }
       for (let i = this.revision - start; i < operations.length; i++) {
         let { id, operation } = operations[i];
+        this.revision++;
         if (id === this.me) {
           this.serverAck();
         } else {
           operation = OpSeq.from_str(JSON.stringify(operation));
           this.applyServer(operation);
         }
-        this.revision++;
       }
     }
   }