getting ready for 0.4 realeasy

This commit is contained in:
DadaMonad
2015-02-15 15:33:35 +00:00
parent b6fe47efe1
commit 60de3ce5b0
13 changed files with 142 additions and 27 deletions

View File

@@ -41,10 +41,10 @@ module.exports =
@receive_handlers ?= []
# whether this instance is bound to any y instance
@is_bound_to_y = false
@connections = {}
@current_sync_target = null
@sent_hb_to_all_users = false
@is_initialized = true
isRoleMaster: ->
@role is "master"
@@ -229,7 +229,7 @@ module.exports =
else if res.sync_step is "applyHB"
@applyHB(res.data, sender is @current_sync_target)
if (@syncMethod is "syncAll" or res.sent_again?) and (not @is_synced) and (@current_sync_target is sender)
if (@syncMethod is "syncAll" or res.sent_again?) and (not @is_synced) and ((@current_sync_target is sender) or (not @current_sync_target?))
@connections[sender].is_synced = true
@findNewSyncTarget()