Log error on eth subscription resubscribe
This commit is contained in:
parent
2d3e7c9612
commit
7c4e8c5750
@ -245,7 +245,7 @@ func (b *EthereumRPC) subscribe(f func() (*rpc.ClientSubscription, error)) error
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
glog.Error("Subscription error ", e)
|
glog.Error("Subscription error ", e)
|
||||||
timer := time.NewTimer(time.Second)
|
timer := time.NewTimer(time.Second * 2)
|
||||||
// try in 1 second interval to resubscribe
|
// try in 1 second interval to resubscribe
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
@ -260,7 +260,8 @@ func (b *EthereumRPC) subscribe(f func() (*rpc.ClientSubscription, error)) error
|
|||||||
s = ns
|
s = ns
|
||||||
continue Loop
|
continue Loop
|
||||||
}
|
}
|
||||||
timer.Reset(time.Second)
|
glog.Error("Resubscribe error ", e)
|
||||||
|
timer.Reset(time.Second * 2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user