Remove unnecessary contexts passed as data to FatalIf. No need to log an empty context. (#6487)

This commit is contained in:
Pontus Leitzler
2018-09-22 01:04:11 +02:00
committed by Harshavardhana
parent 584cb61bb8
commit df60b3c733
8 changed files with 12 additions and 14 deletions
+2 -3
View File
@@ -18,7 +18,6 @@ package cmd
import (
"bytes"
"context"
"crypto/tls"
"io"
"net"
@@ -330,9 +329,9 @@ func NewStorageRPCClient(host *xnet.Host, endpointPath string) (*StorageRPCClien
// Initialize new storage rpc client.
func newStorageRPC(endpoint Endpoint) *StorageRPCClient {
host, err := xnet.ParseHost(endpoint.Host)
logger.FatalIf(err, "Unable to parse storage RPC Host", context.Background())
logger.FatalIf(err, "Unable to parse storage RPC Host")
rpcClient, err := NewStorageRPCClient(host, endpoint.Path)
logger.FatalIf(err, "Unable to initialize storage RPC client", context.Background())
logger.FatalIf(err, "Unable to initialize storage RPC client")
// Attempt first try connection and save error if any.
rpcClient.connect()
return rpcClient