X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning%2Fln%2Fpeer_handler.rs;fp=lightning-c-bindings%2Fsrc%2Flightning%2Fln%2Fpeer_handler.rs;h=c0a61bc6e9c050ff317ec531cdcd0d25e329ba0d;hb=68c220f7ee4fa0b6b4a300f56cd30b9b02ebfbdf;hp=cad056099405deca31539f1f0c5f87885553eb26;hpb=e2145963159417800486d4a12d3e193415a14792;p=ldk-c-bindings diff --git a/lightning-c-bindings/src/lightning/ln/peer_handler.rs b/lightning-c-bindings/src/lightning/ln/peer_handler.rs index cad0560..c0a61bc 100644 --- a/lightning-c-bindings/src/lightning/ln/peer_handler.rs +++ b/lightning-c-bindings/src/lightning/ln/peer_handler.rs @@ -881,9 +881,12 @@ pub extern "C" fn PeerManager_disconnect_by_node_id(this_arg: &PeerManager, mut unsafe { &*this_arg.inner }.disconnect_by_node_id(node_id.into_rust(), no_connection_possible) } -/// This function should be called roughly once every 30 seconds. -/// It will send pings to each peer and disconnect those which did not respond to the last -/// round of pings. +/// Send pings to each peer and disconnect those which did not respond to the last round of +/// pings. +/// +/// This may be called on any timescale you want, however, roughly once every five to ten +/// seconds is preferred. The call rate determines both how often we send a ping to our peers +/// and how much time they have to respond before we disconnect them. /// /// May call [`send_data`] on all [`SocketDescriptor`]s. Thus, be very careful with reentrancy /// issues!