Closed lihebi closed 1 year ago
Loading persisted ydoc takes time, and if SyncStep1 is sent/received before ydoc is ready, the message is discarded, causing provider.synced event never being fired.
ydoc
SyncStep1
provider.synced
This PR adds messages to a queue and processes them after ydoc is loaded from persistence. Ref: https://github.com/yjs/y-websocket/issues/81#issuecomment-1453185788
Loading persisted
ydoc
takes time, and ifSyncStep1
is sent/received beforeydoc
is ready, the message is discarded, causingprovider.synced
event never being fired.This PR adds messages to a queue and processes them after ydoc is loaded from persistence. Ref: https://github.com/yjs/y-websocket/issues/81#issuecomment-1453185788