ethstats: overwrite old errors
This commit is contained in:
parent
8f24097836
commit
6a53ce29a4
@ -256,11 +256,11 @@ func (s *Service) loop() {
|
|||||||
header.Set("origin", "http://localhost")
|
header.Set("origin", "http://localhost")
|
||||||
for _, url := range urls {
|
for _, url := range urls {
|
||||||
c, _, e := dialer.Dial(url, header)
|
c, _, e := dialer.Dial(url, header)
|
||||||
if e == nil {
|
err = e
|
||||||
|
if err == nil {
|
||||||
conn = newConnectionWrapper(c)
|
conn = newConnectionWrapper(c)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
err = e
|
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn("Stats server unreachable", "err", err)
|
log.Warn("Stats server unreachable", "err", err)
|
||||||
@ -275,7 +275,6 @@ func (s *Service) loop() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
go s.readLoop(conn)
|
go s.readLoop(conn)
|
||||||
|
|
||||||
// Send the initial stats so our node looks decent from the get go
|
// Send the initial stats so our node looks decent from the get go
|
||||||
if err = s.report(conn); err != nil {
|
if err = s.report(conn); err != nil {
|
||||||
log.Warn("Initial stats report failed", "err", err)
|
log.Warn("Initial stats report failed", "err", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user