fixed problem in large sendHB
This commit is contained in:
+14
-2
File diff suppressed because one or more lines are too long
@@ -269,10 +269,22 @@ module.exports = {
|
|||||||
send_again = (function(_this) {
|
send_again = (function(_this) {
|
||||||
return function(sv) {
|
return function(sv) {
|
||||||
return function() {
|
return function() {
|
||||||
|
var k, len2;
|
||||||
hb = _this.getHB(sv).hb;
|
hb = _this.getHB(sv).hb;
|
||||||
|
for (k = 0, len2 = hb.length; k < len2; k++) {
|
||||||
|
o = hb[k];
|
||||||
|
_hb.push(o);
|
||||||
|
if (_hb.length > 10) {
|
||||||
|
_this.send(sender, {
|
||||||
|
sync_step: "applyHB_",
|
||||||
|
data: _hb
|
||||||
|
});
|
||||||
|
_hb = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
return _this.send(sender, {
|
return _this.send(sender, {
|
||||||
sync_step: "applyHB",
|
sync_step: "applyHB",
|
||||||
data: hb,
|
data: _hb,
|
||||||
sent_again: "true"
|
sent_again: "true"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
+14
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+32
-13
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+14
-2
File diff suppressed because one or more lines are too long
@@ -239,9 +239,16 @@ module.exports =
|
|||||||
send_again = do (sv = data.state_vector)=>
|
send_again = do (sv = data.state_vector)=>
|
||||||
()=>
|
()=>
|
||||||
hb = @getHB(sv).hb
|
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,
|
@send sender,
|
||||||
sync_step: "applyHB",
|
sync_step: "applyHB",
|
||||||
data: hb
|
data: _hb
|
||||||
sent_again: "true"
|
sent_again: "true"
|
||||||
setTimeout send_again, 3000
|
setTimeout send_again, 3000
|
||||||
else if res.sync_step is "applyHB"
|
else if res.sync_step is "applyHB"
|
||||||
|
|||||||
Reference in New Issue
Block a user