We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62dc682 commit 7728c70Copy full SHA for 7728c70
src/ModelContextProtocol.Core/Client/McpClient.cs
@@ -99,8 +99,7 @@ public ITransport Transport
99
{
100
get
101
102
- Debug.Assert(_sessionTransport is not null, "Must have already initialized a session when invoking this property.");
103
- return _sessionTransport!;
+ return _sessionTransport ?? throw new InvalidOperationException("Must have already initialized a session when invoking this property.");
104
}
105
106
0 commit comments