mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user