Skip to content

Commit 6788e58

Browse files
committed
mcp: improve comment on OnSessionClose callback option
1 parent c999042 commit 6788e58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mcp/streamable.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ type StreamableHTTPOptions struct {
7474
// [§2.1.5]: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#sending-messages-to-the-server
7575
JSONResponse bool
7676

77-
// OnSessionClose is a callback function that is invoked when a [Connection]
78-
// is closed. A connection is closed when the session is ended explicitly by
79-
// the client or when it is interrupted due to a timeout or other errors.
77+
// OnSessionClose is a callback function that is invoked when a [ServerSession]
78+
// is closed. This happens when a session is ended explicitly by the MCP client
79+
// or when it is interrupted due to a timeout or other errors.
8080
OnSessionClose func(sessionID string)
8181
}
8282

0 commit comments

Comments
 (0)