@@ -1668,16 +1668,19 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
16681668 peer_lock. sync_status = InitSyncTracker :: ChannelsSyncing ( 0 ) ;
16691669 }
16701670
1671- if let Err ( ( ) ) = self . message_handler . route_handler . peer_connected ( & their_node_id, & msg, peer_lock. inbound_connection ) {
1672- log_debug ! ( logger, "Route Handler decided we couldn't communicate with peer {}" , log_pubkey!( their_node_id) ) ;
1673- return Err ( PeerHandleError { } . into ( ) ) ;
1674- }
1675- if let Err ( ( ) ) = self . message_handler . chan_handler . peer_connected ( & their_node_id, & msg, peer_lock. inbound_connection ) {
1676- log_debug ! ( logger, "Channel Handler decided we couldn't communicate with peer {}" , log_pubkey!( their_node_id) ) ;
1677- return Err ( PeerHandleError { } . into ( ) ) ;
1671+ let results = [
1672+ ( "Route Handler" , self . message_handler . route_handler . peer_connected ( & their_node_id, & msg, peer_lock. inbound_connection ) ) ,
1673+ ( "Channel Handler" , self . message_handler . chan_handler . peer_connected ( & their_node_id, & msg, peer_lock. inbound_connection ) ) ,
1674+ ( "Onion Handler" , self . message_handler . onion_message_handler . peer_connected ( & their_node_id, & msg, peer_lock. inbound_connection ) ) ,
1675+ ] ;
1676+
1677+ for ( handler_name, result) in & results {
1678+ if result. is_err ( ) {
1679+ log_debug ! ( logger, "{} decided we couldn't communicate with peer {}" , handler_name, log_pubkey!( their_node_id) ) ;
1680+ }
16781681 }
1679- if let Err ( ( ) ) = self . message_handler . onion_message_handler . peer_connected ( & their_node_id , & msg , peer_lock . inbound_connection ) {
1680- log_debug ! ( logger , "Onion Message Handler decided we couldn't communicate with peer {}" , log_pubkey! ( their_node_id ) ) ;
1682+
1683+ if results . iter ( ) . any ( | ( _ , result ) | result . is_err ( ) ) {
16811684 return Err ( PeerHandleError { } . into ( ) ) ;
16821685 }
16831686
0 commit comments