From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Fri, 20 Aug 2021 18:06:58 +0000 (+0000) Subject: Merge pull request #1051 from JosephGoulden/fix_ping_disconnect X-Git-Tag: v0.0.101~32 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=2ced708b71600e99e53ef526d5b4508c784208f9;hp=479ff9018c1a1d49fa8e9036b81bcdcff210a7e5;p=rust-lightning Merge pull request #1051 from JosephGoulden/fix_ping_disconnect fix: peer is disconnected for not responding to ping --- diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index 4fdf2eef..a0751a9d 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -50,7 +50,13 @@ const FRESHNESS_TIMER: u64 = 60; #[cfg(test)] const FRESHNESS_TIMER: u64 = 1; +#[cfg(not(debug_assertions))] const PING_TIMER: u64 = 5; +/// Signature operations take a lot longer without compiler optimisations. +/// Increasing the ping timer allows for this but slower devices will be disconnected if the +/// timeout is reached. +#[cfg(debug_assertions)] +const PING_TIMER: u64 = 30; /// Trait which handles persisting a [`ChannelManager`] to disk. ///