micro adjustment for calling a 2nd .once( with undefined

This commit is contained in:
Mark Nadal 2019-12-12 16:19:34 -08:00
parent 8dbd9db17b
commit dedab599d6
5 changed files with 9 additions and 5 deletions

2
axe.js
View File

@ -288,7 +288,7 @@
var count = Object.keys(opt.peers).length;
if(opt.mob >= count){ return } // TODO: Make dynamic based on RAM/CPU also. Or possibly even weird stuff like opt.mob / axe.up length?
mesh.say({dam: 'mob', mob: count, peers: Object.keys(axe.up)}, peer);
setTimeout(function(){ mesh.bye(peer) }, 9); // something with better perf?
//setTimeout(function(){ mesh.bye(peer) }, 9); // something with better perf? // UNCOMMENT WHEN WE ACTIVATE THIS FEATURE
});
at.on('bye', function(peer){
this.to.next(peer);

View File

@ -53,6 +53,10 @@
$('#hours').text((data.up.time / 60 / 60).toFixed(0));
Stats('memory').line.append(+new Date, data.memory.heapTotal / 1024 / 1024);
try{ Stats('dam # in').line.append(+new Date, data.dam.in.count); }catch(e){}
try{ Stats('dam in MB').line.append(+new Date, data.dam.in.done / 1024 / 1024); }catch(e){}
try{ Stats('dam # out').line.append(+new Date, data.dam.out.count); }catch(e){}
try{ Stats('dam out MB').line.append(+new Date, data.dam.out.done / 1024 / 1024); }catch(e){}
console.log('data',data);
//fetch keys in all, these may be dynamically changing

4
gun.js
View File

@ -961,7 +961,7 @@
if(obj_has(back, 'put')){
back.on('in', back);
}
if(tmp){ return }
if(tmp && u !== back.put){ return } //if(tmp){ return }
msg.$ = back.$;
} else
if(obj_has(back.put, get)){ // TODO: support #LEX !
@ -1174,7 +1174,7 @@
if(u === tmp && u !== at.put){ return true }
neat.put = u;
if(neat.ack){
neat.ack = -1; // TODO: BUG? Should this be 0?
neat.ack = -1; // Shouldn't this be reset to 0? If we do that, SEA test `set user ref should be found` fails, odd.
}
neat.on('in', {
get: key,

View File

@ -66,7 +66,7 @@ Gun.log = function(a,b,c,d){
if('number' == typeof a && 'number' == typeof b && 'string' == typeof c){
var tmp = (all[c] || (all[c] = []));
if(max < tmp.push([a,b])){ all[c] = [] } // reset
return;
//return;
}
return log.apply(Gun, arguments);
}

View File

@ -1,6 +1,6 @@
{
"name": "gun",
"version": "0.2019.1120",
"version": "0.2019.1211",
"description": "A realtime, decentralized, offline-first, graph data synchronization engine.",
"main": "index.js",
"browser": "gun.js",