rpc: improve WS connection closure error a bit

Ref.
https://github.com/nspcc-dev/neofs-node/pull/1480#issuecomment-1147256917.
This commit is contained in:
Anna Shaleva 2022-06-06 12:58:15 +03:00
parent c6ced9b24a
commit 7dcbfcbbdb

View file

@ -257,7 +257,7 @@ writeloop:
break writeloop break writeloop
} }
if err := c.ws.WriteJSON(req); err != nil { if err := c.ws.WriteJSON(req); err != nil {
connCloseErr = fmt.Errorf("failed to write JSON request: %w", err) connCloseErr = fmt.Errorf("failed to write JSON request (%s / %d): %w", req.Method, len(req.RawParams), err)
break writeloop break writeloop
} }
case <-pingTicker.C: case <-pingTicker.C: