Skip to content

Commit 2ced708

Browse files
authored
Merge pull request #1051 from JosephGoulden/fix_ping_disconnect
fix: peer is disconnected for not responding to ping
2 parents 479ff90 + af4eb23 commit 2ced708

File tree

1 file changed

+6
-0
lines changed
  • lightning-background-processor/src

1 file changed

+6
-0
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ const FRESHNESS_TIMER: u64 = 60;
5050
#[cfg(test)]
5151
const FRESHNESS_TIMER: u64 = 1;
5252

53+
#[cfg(not(debug_assertions))]
5354
const PING_TIMER: u64 = 5;
55+
/// Signature operations take a lot longer without compiler optimisations.
56+
/// Increasing the ping timer allows for this but slower devices will be disconnected if the
57+
/// timeout is reached.
58+
#[cfg(debug_assertions)]
59+
const PING_TIMER: u64 = 30;
5460

5561
/// Trait which handles persisting a [`ChannelManager`] to disk.
5662
///

0 commit comments

Comments
 (0)