You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve testing for StreamableHttpHandler and IdleTrackingBackgroundService (#345)
* Add idle session pruning tests
* Remove redundant CTS from StreamableHttpHandler
* StreamableHttpServerTransport.HandlePostRequest already creates the equivelant CTS
which DeleteRequest_CompletesSession_WhichCancelsLongRunningToolCalls verifies
* Fix accept header validation for GET
* Use InvalidOperationException for transport-not-connected errors in doc comments
* Fix flaky Cancellation_ThrowsCancellationException test
[LoggerMessage(Level=LogLevel.Critical,Message="Exceeded static maximum of 10,000 idle connections. Now clearing all inactive connections regardless of timeout.")]
[LoggerMessage(Level=LogLevel.Critical,Message="Exceeded maximum of {maxIdleSessionCount} idle sessions. Now closing sessions active more recently than configured IdleTimeout.")]
Copy file name to clipboardExpand all lines: src/ModelContextProtocol/IMcpEndpoint.cs
+3-2
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,8 @@ public interface IMcpEndpoint : IAsyncDisposable
34
34
/// <param name="request">The JSON-RPC request to send.</param>
35
35
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
36
36
/// <returns>A task containing the endpoint's response.</returns>
37
-
/// <exception cref="McpException">The transport is not connected, or another error occurs during request processing.</exception>
37
+
/// <exception cref="InvalidOperationException">The transport is not connected, or another error occurs during request processing.</exception>
38
+
/// <exception cref="McpException">An error occured during request processing.</exception>
38
39
/// <remarks>
39
40
/// This method provides low-level access to send raw JSON-RPC requests. For most use cases,
40
41
/// consider using the strongly-typed extension methods that provide a more convenient API.
@@ -50,7 +51,7 @@ public interface IMcpEndpoint : IAsyncDisposable
50
51
/// </param>
51
52
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
52
53
/// <returns>A task that represents the asynchronous send operation.</returns>
53
-
/// <exception cref="McpException">The transport is not connected.</exception>
54
+
/// <exception cref="InvalidOperationException">The transport is not connected.</exception>
54
55
/// <exception cref="ArgumentNullException"><paramref name="message"/> is <see langword="null"/>.</exception>
0 commit comments