mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 05:52:48 +00:00
Don't throw an error if we get an ack for our update more than once, since we may try sending it more than once
This commit is contained in:
parent
6ea58d4d6c
commit
4bc31ae2b9
1 changed files with 7 additions and 0 deletions
|
@ -192,6 +192,13 @@ class Doc
|
|||
callback error for callback in @inflightCallbacks
|
||||
else
|
||||
# The op applied successfully.
|
||||
|
||||
# We may get multiple acks of the same message if we retried it,
|
||||
# so its ok if we receive an ack for a version that we've already gone past.
|
||||
# If so, just ignore it
|
||||
if msg.v < @version
|
||||
return
|
||||
|
||||
throw new Error('Invalid version from server') unless msg.v == @version
|
||||
|
||||
@serverOps[@version] = oldInflightOp
|
||||
|
|
Loading…
Reference in a new issue