parent
9f0beec63a
commit
9c597aad90
1 changed files with 533 additions and 37 deletions
|
|
@ -64,13 +64,7 @@ public sealed class SseClientTransport : TransportBase, IClientTransport
|
|||
|
||||
_logger.TransportReadingMessages(EndpointName);
|
||||
|
||||
await Task.WhenAny(
|
||||
_connectionEstablished.Task,
|
||||
Task.Delay(_options.ConnectionTimeout, cancellationToken)
|
||||
);
|
||||
|
||||
if (!IsConnected)
|
||||
throw new TimeoutException("Failed to receive endpoint event");
|
||||
await _connectionEstablished.Task.WaitAsync(_options.ConnectionTimeout, cancellationToken);
|
||||
}
|
||||
catch (McpTransportException)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue