You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See note added in #1283. The API we have is not at all amenable to sending a message before disconnecting, and its unclear how exactly to enable it. We don't really want to call the users' write method from read_event (we faught hard to remove it). We could consider making the disconnection a "message" which we put in the message queue, allowing it to be handled via the normal message sending pipelines. Ideally of course we'd stop processing inbound messages from the peer after we decide they are useless, however, which would require some additional state tracking.
The text was updated successfully, but these errors were encountered:
Is this about allowing the send from the rest of LDK (which we already have via MessageSendEvent::HandleError::ErrorAction::DisconnectPeerWithWarning) or externally? I assume the latter.
This is about the comments in do_read_event where we get a warning or error message to send to peers, but then immediately want to disconnect. eg
// We may have an `ErrorMessage` to send to the peer,
// but writing to the socket while reading can lead to
// re-entrant code and possibly unexpected behavior. The
// message send is optimistic anyway, and in this case
// we immediately disconnect the peer.
See note added in #1283. The API we have is not at all amenable to sending a message before disconnecting, and its unclear how exactly to enable it. We don't really want to call the users' write method from
read_event
(we faught hard to remove it). We could consider making the disconnection a "message" which we put in the message queue, allowing it to be handled via the normal message sending pipelines. Ideally of course we'd stop processing inbound messages from the peer after we decide they are useless, however, which would require some additional state tracking.The text was updated successfully, but these errors were encountered: