mcp: fix potential nil-pointer dereference on message send (#1115)
This commit is contained in:
parent
cc4db25347
commit
bc72835f62
1 changed files with 12 additions and 7 deletions
|
|
@ -1386,6 +1386,12 @@ func TestStreamableClientConnSetMCPHeaders_ProtocolVersion(t *testing.T) {
|
|||
msg jsonrpc.Message
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "nil checked",
|
||||
initializedResult: nil,
|
||||
msg: (*jsonrpc.Request)(nil),
|
||||
want: "",
|
||||
},
|
||||
{
|
||||
name: "message meta wins when initializedResult unset",
|
||||
initializedResult: nil,
|
||||
|
|
|
|||
Loading…
Reference in a new issue