mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
fix(workspace): fix sync stuck (#5762)
* remove MultipleBatchSyncSender * add timeout (30 seconds) on socket.emit
This commit is contained in:
@@ -32,12 +32,13 @@ export class AffineCloudAwarenessProvider implements AwarenessProvider {
|
||||
|
||||
window.addEventListener('beforeunload', this.windowBeforeUnloadHandler);
|
||||
|
||||
this.socket.connect();
|
||||
|
||||
this.socket.on('connect', () => this.handleConnect());
|
||||
|
||||
this.socket.emit('client-handshake-awareness', this.workspaceId);
|
||||
this.socket.emit('awareness-init', this.workspaceId);
|
||||
if (this.socket.connected) {
|
||||
this.handleConnect();
|
||||
} else {
|
||||
this.socket.connect();
|
||||
}
|
||||
}
|
||||
disconnect(): void {
|
||||
removeAwarenessStates(
|
||||
|
||||
Reference in New Issue
Block a user