From 96808d49f6b8e19fbfca190d090eca4882bf9274 Mon Sep 17 00:00:00 2001 From: Lukasz Zajaczkowski Date: Mon, 11 Dec 2023 12:04:27 +0100 Subject: [PATCH] fix nil pointer execption --- pkg/websocket/socket.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/websocket/socket.go b/pkg/websocket/socket.go index ebf3b983..b28608d6 100644 --- a/pkg/websocket/socket.go +++ b/pkg/websocket/socket.go @@ -34,9 +34,9 @@ func New(clusterId, consoleUrl, deployToken string, publisher Publisher) (*Socke if err != nil { return nil, err } - - err = client.Connect(*uri, http.Header{}) socket.client = client + err = client.Connect(*uri, http.Header{}) + return socket, err }