Skip to content

Commit 67ace9e

Browse files
don't report if we fail to find if a protocol is supported
1 parent 41d1f45 commit 67ace9e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dot/network/notifications.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,10 @@ func (s *Service) sendData(peer peer.ID, hs Handshake, info *notificationsProtoc
246246
support, err := s.host.supportsProtocol(peer, info.protocolID)
247247
if err != nil {
248248
logger.Errorf("could not check if protocol %s is supported by peer %s: %s", info.protocolID, peer, err)
249+
return
249250
}
250251

251-
if err != nil || !support {
252+
if !support {
252253
s.host.cm.peerSetHandler.ReportPeer(peerset.ReputationChange{
253254
Value: peerset.BadProtocolValue,
254255
Reason: peerset.BadProtocolReason,

0 commit comments

Comments
 (0)