From 863b9550e69d016f205bd75aa2fc7d0d2cb864a1 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 2 Apr 2021 11:12:50 +0300 Subject: [PATCH] rpcbroadcaster: don't mess with the URL from the config It can be http://, it can be https://, it's not up to rpcbroadcaster to change it in any way. --- pkg/services/helpers/rpcbroadcaster/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/services/helpers/rpcbroadcaster/client.go b/pkg/services/helpers/rpcbroadcaster/client.go index 95cbcffa9..3ee04afdf 100644 --- a/pkg/services/helpers/rpcbroadcaster/client.go +++ b/pkg/services/helpers/rpcbroadcaster/client.go @@ -37,7 +37,7 @@ func (r *RPCBroadcaster) NewRPCClient(addr string, method SendMethod, timeout ti func (c *RPCClient) run() { // We ignore error as not every node can be available on startup. - c.client, _ = client.New(context.Background(), "http://"+c.addr, client.Options{ + c.client, _ = client.New(context.Background(), c.addr, client.Options{ DialTimeout: c.sendTimeout, RequestTimeout: c.sendTimeout, }) @@ -48,7 +48,7 @@ func (c *RPCClient) run() { case ps := <-c.responses: if c.client == nil { var err error - c.client, err = client.New(context.Background(), "http://"+c.addr, client.Options{ + c.client, err = client.New(context.Background(), c.addr, client.Options{ DialTimeout: c.sendTimeout, RequestTimeout: c.sendTimeout, })