Skip to content

Commit

Permalink
Remove scary disconenct warnings on PeerManager new connection fns
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TheBlueMatt committed Jul 25, 2022
1 parent 834fe63 commit 19b5a48
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lightning/src/ln/peer_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
/// peer using the init message.
/// The user should pass the remote network address of the host they are connected to.
///
/// Note that if an Err is returned here you MUST NOT call socket_disconnected for the new
/// descriptor but must disconnect the connection immediately.
/// If an `Err` is returned here you must disconnect the connection immediately.
///
/// Returns a small number of bytes to send to the remote node (currently always 50).
///
Expand Down Expand Up @@ -671,9 +670,8 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
/// The user should pass the remote network address of the host they are connected to.
///
/// May refuse the connection by returning an Err, but will never write bytes to the remote end
/// (outbound connector always speaks first). Note that if an Err is returned here you MUST NOT
/// call socket_disconnected for the new descriptor but must disconnect the connection
/// immediately.
/// (outbound connector always speaks first). If an `Err` is returned here you must disconnect
/// the connection immediately.
///
/// Panics if descriptor is duplicative with some other descriptor which has not yet been
/// [`socket_disconnected()`].
Expand Down

0 comments on commit 19b5a48

Please sign in to comment.