Increase our PING_TIMER to ten seconds, from five. 022-01-no-disconnect-on-slow-persist
authorMatt Corallo <git@bluematt.me>
Thu, 20 Jan 2022 23:42:56 +0000 (23:42 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 21 Jan 2022 00:36:59 +0000 (00:36 +0000)
commit2d3a2108979adca6b7632e2d59c10e4b131e8bf4
treef580113883a4b529ab4a1edb45024212c9c8c837
parent8f5023a006ed0bdc08432c0c283e28d77ab3bc72
Increase our PING_TIMER to ten seconds, from five.

Because many lightning nodes can take quite some time to respond to
pings, the five second ping timer can sometimes cause spurious
disconnects even though a peer is online. However, in part as a
response to mobile users where a connection may be lost as result
of only a short time with the app in a "paused" state, we had a
rather aggressive ping time to ensure we would disconnect quickly.

However, since we now just used a fixed time for the "went to
sleep" detection, we can somewhat increase the ping timer. We still
want to be fairly aggressive to avoid sending HTLCs to a peer that
is offline, but the tradeoff between spurious disconnections and
stuck payments is likely doesn't need to be quite as aggressive.
lightning-background-processor/src/lib.rs