From 90c218eaef6782e508808e90687234f13ea3e38b Mon Sep 17 00:00:00 2001 From: Sir Darkrengarius Date: Tue, 9 Jun 2020 15:07:08 +0300 Subject: [PATCH] Sort out some PR queries --- internal/vpn/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/vpn/client.go b/internal/vpn/client.go index 7ec9e9afd..11ad7da25 100644 --- a/internal/vpn/client.go +++ b/internal/vpn/client.go @@ -74,8 +74,9 @@ func NewClient(cfg ClientConfig, l logrus.FieldLogger, conn net.Conn) (*Client, } } - directIPs := make([]net.IP, 0, 3+len(dmsgSrvAddrs)+len(stcpEntities)) - directIPs = append(directIPs, dmsgDiscIP, tpDiscIP, rfIP) + requiredDirectIPs := []net.IP{dmsgDiscIP, tpDiscIP, rfIP} + directIPs := make([]net.IP, 0, len(requiredDirectIPs)+len(dmsgSrvAddrs)+len(stcpEntities)) + directIPs = append(directIPs, requiredDirectIPs...) directIPs = append(directIPs, dmsgSrvAddrs...) directIPs = append(directIPs, stcpEntities...)