reconnect when no message received in a long time

This commit is contained in:
Kevin Jahns
2019-08-02 00:24:08 +02:00
parent 397164d7bc
commit 953aa592fe
4 changed files with 40 additions and 15 deletions

View File

@@ -64,6 +64,7 @@ class WSSharedDoc extends Y.Doc {
* @type {awarenessProtocol.Awareness}
*/
this.awareness = new awarenessProtocol.Awareness(this)
this.awareness.setLocalState(null)
/**
* @param {{ added: Array<number>, updated: Array<number>, removed: Array<number> }} changes
* @param {Object | null} conn Origin is the connection that made the change