Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Change casing of HandshakeFailure::TcpError
Browse files Browse the repository at this point in the history
Change enum casing so that it's consistent with DisconnectReason::TCPError and update value references.
  • Loading branch information
halfalicious committed Jun 16, 2019
1 parent 7b67130 commit 81deb54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libp2p/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ enum HandshakeFailureReason
NoFailure = 0,
UnknownFailure,
Timeout,
TcpError,
TCPError,
FrameDecryptionFailure,
InternalError,
ProtocolError
Expand Down
2 changes: 1 addition & 1 deletion libp2p/Peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bool Peer::isUseless() const
return true;
// Potentially transient cases which can resolve quickly
case PingTimeout:
case TCPError:
case DisconnectReason::TCPError:
case TooManyPeers:
return m_failedAttempts >= 10;
// Potentially transient cases which can take longer to resolve
Expand Down
2 changes: 1 addition & 1 deletion libp2p/RLPxHandshake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void RLPXHandshake::transition(boost::system::error_code _ech)
if (_ech || m_nextState == Error || m_cancel)
{
if (_ech)
m_failureReason = TcpError;
m_failureReason = HandshakeFailureReason::TCPError;
return error(_ech);
}

Expand Down

0 comments on commit 81deb54

Please sign in to comment.