We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1777dd commit b9d1882Copy full SHA for b9d1882
src/y-socket-io/y-socket-io.js
@@ -370,6 +370,15 @@ export class YSocketIO {
370
}
371
372
})
373
+ socket.onAnyOutgoing(async (ev) => {
374
+ if (ev !== 'reload') return
375
+ if (!WORKER_DISABLED) return
376
+ const namespace = this.getNamespaceString(socket.nsp)
377
+ logSocketIO(`reload event triggered, updating namespace doc in: ${namespace}`)
378
+ assert(this.client)
379
+ const doc = await this.client.getDoc(namespace, 'index')
380
+ this.namespaceDocMap.set(namespace, doc)
381
+ })
382
383
384
/**
0 commit comments