Skip to content

Commit b6efce6

Browse files
Update src/ModelContextProtocol/Client/McpClient.cs
Co-authored-by: Stephen Halter <halter73@gmail.com>
1 parent 746b9c8 commit b6efce6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/ModelContextProtocol/Client/McpClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ public ITransport Transport
8585
{
8686
get
8787
{
88-
Debug.Assert(_sessionTransport is not null, "Must have already initialized a session when invoking this property.");
89-
return _sessionTransport!;
88+
return _sessionTransport ?? throw new InvalidOperationException("Must have already initialized a session when invoking this property.");
9089
}
9190
}
9291

0 commit comments

Comments
 (0)