tari icon indicating copy to clipboard operation
tari copied to clipboard

Replace Minimized with DisconnectReason in comms

Open hansieodendaal opened this issue 9 months ago • 0 comments

It appears that this is only used to improve logs.

Not necessary for now but I'd suggest making this a general reason enum (you can use thiserror for the human readable text or impl Display)

#[derive(Debug, Clone, Copy, thiserror::Error)]
pub enum DisconnectReason {
    #[error("Remote disconnected")]
    RemoteDisconnected,
    #[error("Connection was culled because it was inactive")]
    ConnectionCulledInactive, 
     #[error("Connection was culled to reduce number of connections")]
    ConnectionCulledMinimise
    #[error("Local node explicit disconnect")]
    LocalDisconnected
}

Originally posted by @sdbondi in https://github.com/tari-project/tari/pull/6307#discussion_r1596245589

hansieodendaal avatar May 10 '24 05:05 hansieodendaal