Skip to content

Commit

Permalink
don't report if we fail to find if a protocol is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
kishansagathiya committed Apr 4, 2022
1 parent 41d1f45 commit 67ace9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dot/network/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ func (s *Service) sendData(peer peer.ID, hs Handshake, info *notificationsProtoc
support, err := s.host.supportsProtocol(peer, info.protocolID)
if err != nil {
logger.Errorf("could not check if protocol %s is supported by peer %s: %s", info.protocolID, peer, err)
return
}

if err != nil || !support {
if !support {
s.host.cm.peerSetHandler.ReportPeer(peerset.ReputationChange{
Value: peerset.BadProtocolValue,
Reason: peerset.BadProtocolReason,
Expand Down

0 comments on commit 67ace9e

Please sign in to comment.