Skip to content

Commit 6476e6b

Browse files
committed
mcp: add stream type (2)
1 parent 615f0e6 commit 6476e6b

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
@@ -255,7 +255,7 @@ type stream struct {
255255

256256
// streamRequests is the set of unanswered incoming RPCs for the stream.
257257
//
258-
// Lifecycle: requests values persist as until the requests have been
258+
// Lifecycle: requests values persist until the requests have been
259259
// replied to by the server. Notably, NOT until they are sent to an HTTP
260260
// response, as delivery is not guaranteed.
261261
requests map[jsonrpc.ID]struct{}
@@ -598,7 +598,7 @@ func (t *StreamableServerTransport) Write(ctx context.Context, msg jsonrpc.Messa
598598
t.mu.Lock()
599599
defer t.mu.Unlock()
600600
if t.isDone {
601-
return errors.New("session is closed") // TODO: should this be EOF?
601+
return errors.New("session is closed")
602602
}
603603

604604
stream := t.streams[forConn]

0 commit comments

Comments
 (0)