Skip to content

Commit

Permalink
ethstats: overwrite old errors
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Aug 7, 2020
1 parent 8f24097 commit 6a53ce2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ethstats/ethstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 6a53ce2

Please sign in to comment.