فهرست منبع

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++;
       }
     }
   }