avoid creating new err variable

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-02-11 15:21:44 +03:00
parent d300f5cfe7
commit 08ceb7b108

View File

@ -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())
}