mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
check & optimize
This commit is contained in:
parent
402c56d14b
commit
fa8a03c3ff
11
gun.js
11
gun.js
@ -639,7 +639,7 @@
|
||||
Type.obj.del(dup.s, id);
|
||||
});
|
||||
dup.to = null;
|
||||
}, opt.age);
|
||||
}, opt.age + 9);
|
||||
}
|
||||
return it;
|
||||
}
|
||||
@ -1812,7 +1812,8 @@
|
||||
if(this.to){ this.to.next(msg) }
|
||||
if((tmp = msg['@'])
|
||||
&& (tmp = ctx.dup.s[tmp])
|
||||
&& (tmp = tmp.it)){
|
||||
&& (tmp = tmp.it)
|
||||
&& tmp.mesh){
|
||||
mesh.say(msg, tmp.mesh.via);
|
||||
tmp['##'] = msg['##'];
|
||||
return;
|
||||
@ -1933,9 +1934,9 @@
|
||||
msg['#'] = hash;
|
||||
if(put){ (msg = Type.obj.to(msg)).put = _ }
|
||||
}
|
||||
msg['><'] = (Type.obj.map(ctx.opt.peers, function(p,k,m){
|
||||
m(p.url || p.id);
|
||||
}) || []).join();
|
||||
var i = 0, to = []; Type.obj.map(ctx.opt.peers, function(p){
|
||||
to.push[p.url || p.id]; if(++i > 9){ return true } // limit server, fast fix, improve later!
|
||||
}); msg['><'] = to.join();
|
||||
var raw = $(msg);
|
||||
if(u !== put){
|
||||
raw = raw.replace('"'+ _ +'"', put);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gun",
|
||||
"version": "0.9.97",
|
||||
"version": "0.9.98",
|
||||
"description": "A realtime, decentralized, offline-first, graph data synchronization engine.",
|
||||
"main": "index.js",
|
||||
"browser": "gun.min.js",
|
||||
|
Loading…
x
Reference in New Issue
Block a user