Add Rejected variant to PeerError enum, for now

This commit is contained in:
Deirdre Connolly 2019-11-26 01:59:13 -05:00 committed by Deirdre Connolly
parent bae9347f6e
commit 49c5265d41
1 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,14 @@ pub enum PeerError {
/// to shed load.
#[error("Internal services over capacity")]
Overloaded,
/// We got a `Reject` message. This does not necessarily mean that
/// the peer connection is in a bad state, but for the time being
/// we are considering it a PeerError.
// TODO: Create a different error type (more at the application
// level than network/connection level) that will include the
// appropriate error when a `Reject` message is received.
#[error("Received a Reject message")]
Rejected,
}
#[derive(Default, Clone)]