handle unexpected disconnect flow
This commit is contained in:
parent
1eb06079de
commit
2e92786bf0
@ -72,8 +72,10 @@ class WSSharedDoc extends Y.Doc {
|
|||||||
const changedClients = added.concat(updated, removed)
|
const changedClients = added.concat(updated, removed)
|
||||||
if (conn !== null) {
|
if (conn !== null) {
|
||||||
const connControlledIDs = /** @type {Set<number>} */ (this.conns.get(conn))
|
const connControlledIDs = /** @type {Set<number>} */ (this.conns.get(conn))
|
||||||
added.forEach(clientID => { connControlledIDs.add(clientID) })
|
if (connControlledIDs !== undefined) {
|
||||||
removed.forEach(clientID => { connControlledIDs.delete(clientID) })
|
added.forEach(clientID => { connControlledIDs.add(clientID) })
|
||||||
|
removed.forEach(clientID => { connControlledIDs.delete(clientID) })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// broadcast awareness update
|
// broadcast awareness update
|
||||||
const encoder = encoding.createEncoder()
|
const encoder = encoding.createEncoder()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user