Skip to content

Commit 5f329fa

Browse files
GosthellJBUinfo
authored andcommitted
fix(client): ping response
1 parent cc4c6e7 commit 5f329fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,11 @@ func (c *Client) handleElicitationRequestTransport(ctx context.Context, request
575575
}
576576

577577
func (c *Client) handlePingRequestTransport(ctx context.Context, request transport.JSONRPCRequest) (*transport.JSONRPCResponse, error) {
578-
//var result *mcp.EmptyResult
578+
b, _ := json.Marshal(&mcp.EmptyResult{})
579579
return &transport.JSONRPCResponse{
580580
JSONRPC: mcp.JSONRPC_VERSION,
581-
ID: mcp.NewRequestId(request.ID),
582-
Result: nil,
581+
ID: request.ID,
582+
Result: b,
583583
}, nil
584584
}
585585

0 commit comments

Comments
 (0)