mirror of
https://github.com/amark/gun.git
synced 2025-11-24 14:35:55 +00:00
floor >>
This commit is contained in:
parent
3749bf74cf
commit
faff04ff63
2
gun.js
2
gun.js
@ -1653,7 +1653,7 @@
|
|||||||
}
|
}
|
||||||
mesh.hear['mob'] = function(msg, peer){ // NOTE: AXE will overload this with better logic.
|
mesh.hear['mob'] = function(msg, peer){ // NOTE: AXE will overload this with better logic.
|
||||||
if(!msg.peers){ return }
|
if(!msg.peers){ return }
|
||||||
var peers = Object.keys(msg.peers), one = peers[Math.floor(Math.random()*peers.length)];
|
var peers = Object.keys(msg.peers), one = peers[(Math.random()*peers.length) >> 0];
|
||||||
if(!one){ return }
|
if(!one){ return }
|
||||||
mesh.bye(peer);
|
mesh.bye(peer);
|
||||||
mesh.hi(one);
|
mesh.hi(one);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user