connectd: control connect backoff from lightningd.
We used to tell connectd to remember our connect delay, and hand it back (increased if necessary). Instead, simply record when we last tried to connect. If it was less than 10 minutes ago, double delay (up to 5 minutes max), otherwise reset delay to 1 second. This covers all scenarios: whether we reconnect then immediately disconnect, or never successfully connect, it doesn't matter. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Fixes: #5453
This commit is contained in:
@@ -47,7 +47,6 @@ msgdata,connectd_activate_reply,failmsg,?wirestring,
|
||||
# Master -> connectd: connect to a peer.
|
||||
msgtype,connectd_connect_to_peer,2001
|
||||
msgdata,connectd_connect_to_peer,id,node_id,
|
||||
msgdata,connectd_connect_to_peer,seconds_waited,u32,
|
||||
msgdata,connectd_connect_to_peer,len,u32,
|
||||
msgdata,connectd_connect_to_peer,addrs,wireaddr,len
|
||||
msgdata,connectd_connect_to_peer,addrhint,?wireaddr_internal,
|
||||
@@ -57,7 +56,6 @@ msgtype,connectd_connect_failed,2020
|
||||
msgdata,connectd_connect_failed,id,node_id,
|
||||
msgdata,connectd_connect_failed,failcode,errcode_t,
|
||||
msgdata,connectd_connect_failed,failreason,wirestring,
|
||||
msgdata,connectd_connect_failed,seconds_to_delay,u32,
|
||||
msgdata,connectd_connect_failed,addrhint,?wireaddr_internal,
|
||||
|
||||
# Connectd -> master: we got a peer.
|
||||
|
||||
|
Reference in New Issue
Block a user