mcp/server: fix nil PingParams in server.Ping (#163)
Use OrZero in case PingParams is nil to avoid typed nil. Fixes: #162
This commit is contained in:
parent
bcbb31f072
commit
94b88a26e0
1 changed files with 1 additions and 1 deletions
|
|
@ -610,7 +610,7 @@ func (ss *ServerSession) ID() string {
|
|||
|
||||
// Ping pings the client.
|
||||
func (ss *ServerSession) Ping(ctx context.Context, params *PingParams) error {
|
||||
_, err := handleSend[*emptyResult](ctx, ss, methodPing, params)
|
||||
_, err := handleSend[*emptyResult](ctx, ss, methodPing, orZero[Params](params))
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue