mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +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.
|
||||
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 }
|
||||
mesh.bye(peer);
|
||||
mesh.hi(one);
|
||||
|
Loading…
x
Reference in New Issue
Block a user