We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73a8a6c commit a090008Copy full SHA for a090008
1 file changed
lib/ot/editor-socketio-server.js
@@ -55,7 +55,15 @@ EditorSocketIOServer.prototype.addClient = function (socket) {
55
if (typeof self.operationCallback === 'function')
56
self.operationCallback(socket, operation);
57
} catch (err) {
58
- socket.disconnect(true);
+ setTimeout(function() {
59
+ var docOut = {
60
+ str: self.document,
61
+ revision: self.operations.length,
62
+ clients: self.users,
63
+ force: true
64
+ };
65
+ socket.emit('doc', LZString.compressToUTF16(JSON.stringify(docOut)));
66
+ }, 100);
67
}
68
});
69
0 commit comments