Skip to content

Commit d384500

Browse files
committed
fix possible nil dereference
1 parent 7197268 commit d384500

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
golang 1.21
1+
golang 1.21.3

internal/subscriber/utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ func NewRPCClient(rpcAddr string, timeout time.Duration) (RpcHttpClient, error)
3333
}
3434
httpClient.Timeout = timeout
3535
client, err := tmhttp.NewWithClient(rpcAddr, rpcWSEndpoint, httpClient)
36+
if err != nil {
37+
return nil, fmt.Errorf("failed to create tendermint rpc client: %w", err)
38+
}
3639
return *client, err
3740
}
3841

0 commit comments

Comments
 (0)