mirror of
https://github.com/amark/gun.git
synced 2025-06-08 15:16:42 +00:00
heartbeat is needed?
This commit is contained in:
parent
c4ba41c4b8
commit
86043aa89e
@ -78,6 +78,7 @@ Gun.on('opt', function(root){
|
|||||||
opt.mesh.bye(peer);
|
opt.mesh.bye(peer);
|
||||||
});
|
});
|
||||||
wire.on('error', function(e){});
|
wire.on('error', function(e){});
|
||||||
|
setTimeout(function heart(){ if(!opt.peers[peer.id]){ return } try{ wire.send("[]"); setTimeout(heart, 1000 * 20) }catch(e){} }, 1000 * 20); // Some systems, like Heroku, require heartbeats to not time out. // TODO: Make this configurable?
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user