mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
p2p/discover: fix lookup failure log
This commit is contained in:
parent
ea9f0a4b03
commit
edb3a12a66
1 changed files with 4 additions and 3 deletions
|
|
@ -141,12 +141,13 @@ func (it *lookup) slowdown() {
|
||||||
|
|
||||||
func (it *lookup) query(n *node, reply chan<- []*node) {
|
func (it *lookup) query(n *node, reply chan<- []*node) {
|
||||||
r, err := it.queryfunc(n)
|
r, err := it.queryfunc(n)
|
||||||
if !errors.Is(err, errClosed) {
|
if !errors.Is(err, errClosed) { // avoid recording failures on shutdown.
|
||||||
// Avoid recording failures on shutdown.
|
|
||||||
success := len(r) > 0
|
success := len(r) > 0
|
||||||
it.tab.trackRequest(n, success, r)
|
it.tab.trackRequest(n, success, r)
|
||||||
|
if err != nil {
|
||||||
it.tab.log.Trace("FINDNODE failed", "id", n.ID(), "err", err)
|
it.tab.log.Trace("FINDNODE failed", "id", n.ID(), "err", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
reply <- r
|
reply <- r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue