fixed problem in large sendHB

This commit is contained in:
Kevin Jahns
2015-05-04 13:25:12 +02:00
parent 3eed100b8d
commit 93f3a49396
9 changed files with 125 additions and 27 deletions

View File

@@ -239,9 +239,16 @@ module.exports =
send_again = do (sv = data.state_vector)=>
()=>
hb = @getHB(sv).hb
for o in hb
_hb.push o
if _hb.length > 10
@send sender,
sync_step: "applyHB_"
data: _hb
_hb = []
@send sender,
sync_step: "applyHB",
data: hb
data: _hb
sent_again: "true"
setTimeout send_again, 3000
else if res.sync_step is "applyHB"