Merge pull request #21428 from holiman/ethstats_moar

ethstats: overwrite old errors
This commit is contained in:
Péter Szilágyi 2020-08-07 19:40:28 +03:00 committed by GitHub
commit 48b484c5ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,11 +256,11 @@ func (s *Service) loop() {
header.Set("origin", "http://localhost")
for _, url := range urls {
c, _, e := dialer.Dial(url, header)
if e == nil {
err = e
if err == nil {
conn = newConnectionWrapper(c)
break
}
err = e
}
if err != nil {
log.Warn("Stats server unreachable", "err", err)
@ -275,7 +275,6 @@ func (s *Service) loop() {
continue
}
go s.readLoop(conn)
// Send the initial stats so our node looks decent from the get go
if err = s.report(conn); err != nil {
log.Warn("Initial stats report failed", "err", err)