From 7c4e8c57500b93ceb38b1925484ab7ae6d9d79a9 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Tue, 7 May 2019 12:23:50 +0200 Subject: [PATCH] Log error on eth subscription resubscribe --- bchain/coins/eth/ethrpc.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bchain/coins/eth/ethrpc.go b/bchain/coins/eth/ethrpc.go index eb0bdc2d..82fa83c2 100644 --- a/bchain/coins/eth/ethrpc.go +++ b/bchain/coins/eth/ethrpc.go @@ -245,7 +245,7 @@ func (b *EthereumRPC) subscribe(f func() (*rpc.ClientSubscription, error)) error return } glog.Error("Subscription error ", e) - timer := time.NewTimer(time.Second) + timer := time.NewTimer(time.Second * 2) // try in 1 second interval to resubscribe for { select { @@ -260,7 +260,8 @@ func (b *EthereumRPC) subscribe(f func() (*rpc.ClientSubscription, error)) error s = ns continue Loop } - timer.Reset(time.Second) + glog.Error("Resubscribe error ", e) + timer.Reset(time.Second * 2) } } }