Skip to content

Commit 7728c70

Browse files
Update src/ModelContextProtocol/Client/McpClient.cs
Co-authored-by: Stephen Halter <halter73@gmail.com>
1 parent 62dc682 commit 7728c70

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ModelContextProtocol.Core/Client/McpClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ public ITransport Transport
9999
{
100100
get
101101
{
102-
Debug.Assert(_sessionTransport is not null, "Must have already initialized a session when invoking this property.");
103-
return _sessionTransport!;
102+
return _sessionTransport ?? throw new InvalidOperationException("Must have already initialized a session when invoking this property.");
104103
}
105104
}
106105

0 commit comments

Comments
 (0)