Remove unnecessary _connectCts field from McpClientImpl (#1323)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
parent
bd758ff901
commit
49141a300c
1 changed files with 0 additions and 5 deletions
|
|
@ -22,8 +22,6 @@ internal sealed partial class McpClientImpl : McpClient
|
||||||
private readonly SemaphoreSlim _disposeLock = new(1, 1);
|
private readonly SemaphoreSlim _disposeLock = new(1, 1);
|
||||||
private readonly McpTaskCancellationTokenProvider? _taskCancellationTokenProvider;
|
private readonly McpTaskCancellationTokenProvider? _taskCancellationTokenProvider;
|
||||||
|
|
||||||
private CancellationTokenSource? _connectCts;
|
|
||||||
|
|
||||||
private ServerCapabilities? _serverCapabilities;
|
private ServerCapabilities? _serverCapabilities;
|
||||||
private Implementation? _serverInfo;
|
private Implementation? _serverInfo;
|
||||||
private string? _serverInstructions;
|
private string? _serverInstructions;
|
||||||
|
|
@ -526,9 +524,6 @@ internal sealed partial class McpClientImpl : McpClient
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task ConnectAsync(CancellationToken cancellationToken = default)
|
public async Task ConnectAsync(CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
_connectCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
|
|
||||||
cancellationToken = _connectCts.Token;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// We don't want the ConnectAsync token to cancel the message processing loop after we've successfully connected.
|
// We don't want the ConnectAsync token to cancel the message processing loop after we've successfully connected.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue