Skip to content

Commit d807ae7

Browse files
authored
fix(client/transport/stream): check for nil pointer (#404)
1 parent 93176e8 commit d807ae7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/transport/streamable_http.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ func NewStreamableHTTP(serverURL string, options ...StreamableHTTPCOption) (*Str
103103
smc.sessionID.Store("") // set initial value to simplify later usage
104104

105105
for _, opt := range options {
106-
opt(smc)
106+
if opt != nil {
107+
opt(smc)
108+
}
107109
}
108110

109111
// If OAuth is configured, set the base URL for metadata discovery

0 commit comments

Comments
 (0)