heartbeat is needed?

This commit is contained in:
Mark Nadal 2019-05-28 02:02:42 -07:00
parent c4ba41c4b8
commit 86043aa89e

View File

@ -78,6 +78,7 @@ Gun.on('opt', function(root){
opt.mesh.bye(peer);
});
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?
});
}