Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • sweng-group-15/yjs
1 result
Show changes
Commits on Source (1)
......@@ -351,13 +351,29 @@ module.exports = function (Y/* :any */) {
}
})
*/
defer.resolve()
defer.resolve(m.os && m.os.length > 0)
})
} else if (message.type === 'sync done') {
var self = this
this.connections[sender].syncStep2.then(function () {
this.connections[sender].syncStep2.then(function (resync) {
if (resync) {
const answer = {
type: 'sync check',
}
for (const uid in self.connections) {
if (uid !== sender) {
self.send(uid, answer)
}
}
}
self._setSyncedWith(sender)
})
} else if (message.type === 'sync check') {
const conn = this.connections[sender]
if (conn != null && conn.isSynced) {
conn.isSynced = false
}
this.findNextSyncTarget()
} else if (message.type === 'update' && canWrite(auth)) {
if (this.forwardToSyncingClients) {
for (var client of this.syncingClients) {
......