good morning!!!!

Skip to content
Snippets Groups Projects
Verified Commit 0103661d authored by a's avatar a
Browse files

ok

parent 67777624
Branches
Tags v0.3.13
No related merge requests found
Pipeline #31670 failed
...@@ -110,11 +110,17 @@ func (c *Client) listen() error { ...@@ -110,11 +110,17 @@ func (c *Client) listen() error {
func (c *Client) Do(ctx context.Context, result any, method string, params any) error { func (c *Client) Do(ctx context.Context, result any, method string, params any) error {
id := c.p.NextId() id := c.p.NextId()
buf := jjson.GetBuf()
defer jjson.PutBuf(buf)
req, err := jsonrpc.NewRequest(ctx, jsonrpc.NewId(id), method, params) req, err := jsonrpc.NewRequest(ctx, jsonrpc.NewId(id), method, params)
if err != nil { if err != nil {
return err return err
} }
err = jjson.MarshalAndEncode(c.wr, req) err = json.NewEncoder(buf).Encode(req)
if err != nil {
return err
}
err = c.writeContext(req.Context(), buf.Bytes())
if err != nil { if err != nil {
return err return err
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment