Skip to content

Commit

Permalink
use websocket for all rpc requests when it's turned on
Browse files Browse the repository at this point in the history
Signed-off-by: Chengxuan Xing <[email protected]>
  • Loading branch information
Chengxuan committed Aug 19, 2024
1 parent 87d8572 commit 703ab58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ethereum/blocklistener.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ func newBlockListener(ctx context.Context, c *ethConnector, conf config.Section,
}
if wsConf != nil {
bl.wsBackend = rpcbackend.NewWSRPCClient(wsConf)
bl.backend = bl.wsBackend
}
bl.blockCache, err = lru.New(conf.GetInt(BlockCacheSize))
if err != nil {
Expand Down Expand Up @@ -118,6 +117,7 @@ func (bl *blockListener) establishBlockHeightWithRetry() error {
log.L(bl.ctx).Warnf("WebSocket connection failed, blocking startup of block listener: %s", err)
return true, err
}
bl.backend = bl.wsBackend
// if we retry subscribe, we don't want to retry connect
wsConnected = true
}
Expand Down

0 comments on commit 703ab58

Please sign in to comment.