Skip to content

Commit 5815289

Browse files
committed
fix: increase ping timeout when running in debug mode to allow for extra time taken to validate signatures
1 parent f27c08f commit 5815289

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ 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+
#[cfg(debug_assertions)]
56+
const PING_TIMER: u64 = 30;
5457

5558
/// Trait which handles persisting a [`ChannelManager`] to disk.
5659
///

lightning/src/ln/peer_handler.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,10 +1396,6 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref> PeerManager<D
13961396
let mut descriptors_needing_disconnect = Vec::new();
13971397

13981398
peers.retain(|descriptor, peer| {
1399-
if !peer.pending_read_is_header {
1400-
// There are messages currently being processed from this peer.
1401-
return true;
1402-
}
14031399
if peer.awaiting_pong {
14041400
descriptors_needing_disconnect.push(descriptor.clone());
14051401
match peer.their_node_id {

0 commit comments

Comments
 (0)