]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Clean up handshake timeout disconnection log message 2023-04-better-discon-err-msg
authorMatt Corallo <git@bluematt.me>
Fri, 21 Apr 2023 17:18:04 +0000 (17:18 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 21 Apr 2023 17:18:04 +0000 (17:18 +0000)
It currently reads "disconnected from peer which hasn't completed
handshake due to ping timeout", which is confusing.

Instead, it will now read "disconnected from peer which hasn't
completed handshake due to ping/handshake timeout"

lightning/src/ln/peer_handler.rs

index 2fbb22e889e318f95e3167841a0dca554b57ded5..84870143008a3f19bd47fe2a303a897760bba516 100644 (file)
@@ -2103,7 +2103,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
                                                if let Some((node_id, _)) = peer.their_node_id {
                                                        self.node_id_to_descriptor.lock().unwrap().remove(&node_id);
                                                }
-                                               self.do_disconnect(descriptor, &*peer, "ping timeout");
+                                               self.do_disconnect(descriptor, &*peer, "ping/handshake timeout");
                                        }
                                }
                        }