Skip to content

Commit 19b5a48

Browse files
committed
Remove scary disconenct warnings on PeerManager new connection fns
In 4703d4e we changed PeerManager::socket_disconnected to no longer require that sockets which the PeerManager decided to disconnect not be disconnected. However, we forgot to remove the scary warnings on the `new_{inbound,outbound}_connection` functions which warned of the old behavior. We do so here.
1 parent 834fe63 commit 19b5a48

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
622622
/// peer using the init message.
623623
/// The user should pass the remote network address of the host they are connected to.
624624
///
625-
/// Note that if an Err is returned here you MUST NOT call socket_disconnected for the new
626-
/// descriptor but must disconnect the connection immediately.
625+
/// If an `Err` is returned here you must disconnect the connection immediately.
627626
///
628627
/// Returns a small number of bytes to send to the remote node (currently always 50).
629628
///
@@ -671,9 +670,8 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
671670
/// The user should pass the remote network address of the host they are connected to.
672671
///
673672
/// May refuse the connection by returning an Err, but will never write bytes to the remote end
674-
/// (outbound connector always speaks first). Note that if an Err is returned here you MUST NOT
675-
/// call socket_disconnected for the new descriptor but must disconnect the connection
676-
/// immediately.
673+
/// (outbound connector always speaks first). If an `Err` is returned here you must disconnect
674+
/// the connection immediately.
677675
///
678676
/// Panics if descriptor is duplicative with some other descriptor which has not yet been
679677
/// [`socket_disconnected()`].

0 commit comments

Comments
 (0)