Skip to content

Commit

Permalink
Makes linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ksysoev committed Oct 30, 2023
1 parent 7eb3b55 commit 615ec82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/ws/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ func NewWS(url string, opts Options) (*Connection, error) {
err = websocket.Message.Receive(ws, &msg)
if err != nil {
if opts.WaitForResp >= 0 {
// If we are waiting for single response and connection is closed
// we just return from the function
return
} else if err.Error() == "EOF" {
}

if err.Error() == "EOF" {
color.New(color.FgRed).Println("Connection closed by the server")
} else {
color.New(color.FgRed).Println("Fail read from connection: ", err)
Expand Down

0 comments on commit 615ec82

Please sign in to comment.