Update metrics.go

This commit is contained in:
Felix Lange 2025-04-14 22:00:01 +02:00 committed by GitHub
parent 6635c0f840
commit 35960264e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,7 +68,7 @@ func markDialError(err error) {
return
}
var e *protoHandshakeError
var phe *protoHandshakeError
switch {
case errors.Is(err, DiscTooManyPeers):
dialTooManyPeers.Mark(1)
@ -82,7 +82,7 @@ func markDialError(err error) {
dialUnexpectedIdentity.Mark(1)
case errors.Is(err, errEncHandshakeError):
dialEncHandshakeError.Mark(1)
case errors.As(err, &e):
case errors.As(err, &phe):
dialProtoHandshakeError.Mark(1)
}
}