mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
eth/protocols/eth: fix handshake timeout metrics classification
This commit is contained in:
parent
eaaa5b716d
commit
d09ece6b6e
1 changed files with 7 additions and 1 deletions
|
|
@ -191,7 +191,13 @@ func markError(p *Peer, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m := meters.get(p.Inbound())
|
m := meters.get(p.Inbound())
|
||||||
switch errors.Unwrap(err) {
|
|
||||||
|
base := errors.Unwrap(err)
|
||||||
|
if base == nil {
|
||||||
|
base = err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch base {
|
||||||
case errNetworkIDMismatch:
|
case errNetworkIDMismatch:
|
||||||
m.networkIDMismatch.Mark(1)
|
m.networkIDMismatch.Mark(1)
|
||||||
case errProtocolVersionMismatch:
|
case errProtocolVersionMismatch:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue