From 08ceb7b10888553a02204aa3df2ac4a9aa0dae96 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 11 Feb 2021 15:21:44 +0300 Subject: [PATCH] avoid creating new err variable Signed-off-by: Vasiliy Tolstov --- stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream.go b/stream.go index 5e7acd3..468ab6b 100644 --- a/stream.go +++ b/stream.go @@ -165,7 +165,7 @@ func serveWebsocket(ctx context.Context, w http.ResponseWriter, r *http.Request, } // write the response - if err := wsutil.WriteServerMessage(rw, op, buf); err != nil { + if err = wsutil.WriteServerMessage(rw, op, buf); err != nil { if logger.V(logger.ErrorLevel) { logger.Error(ctx, err.Error()) }