Skip to content

Commit e87de4f

Browse files
committed
mcp: refactor requested changes to StreamID and comments
- Removed the StreamID type wrapper around empty strings - fixed the incorrect comment citing defaultStreamID's
1 parent 551e121 commit e87de4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mcp/streamable.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func NewStreamableServerTransport(sessionID string, opts *StreamableServerTransp
182182
streams: make(map[StreamID]*stream),
183183
requestStreams: make(map[jsonrpc.ID]StreamID),
184184
}
185-
t.streams[StreamID("")] = newStream(StreamID(""))
185+
t.streams[""] = newStream("")
186186
if opts != nil {
187187
t.opts = *opts
188188
}
@@ -240,7 +240,7 @@ type StreamableServerTransport struct {
240240
// at any time.
241241
type stream struct {
242242
// id is the logical ID for the stream, unique within a session.
243-
// defaultStreamID is used for messages that don't correlate with an incoming request.
243+
// an empty string is used for messages that don't correlate with an incoming request.
244244
id StreamID
245245

246246
// signal is a 1-buffered channel, owned by an incoming HTTP request, that signals

0 commit comments

Comments
 (0)