Explorar o código

Fix bug that was causing clients to disconnect

Eric Zhang %!s(int64=4) %!d(string=hai) anos
pai
achega
7b00ffdd85
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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++;
       }
     }
   }