Merge pull request #2540 from nspcc-dev/adjust-ws-err

rpc: improve WS connection closure error a bit
This commit is contained in:
Roman Khimov 2022-06-06 14:16:41 +03:00 committed by GitHub
commit de6cdb6d5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -257,7 +257,7 @@ writeloop:
break writeloop
}
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
}
case <-pingTicker.C: