Skip to content

Commit 374f719

Browse files
Copilotstephentoub
andauthored
Increase MaxReconnectionAttempts default from 2 to 5 (#1355)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent e7b779a commit 374f719

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/ModelContextProtocol.Core/Client/HttpClientTransportOptions.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,15 @@ public required Uri Endpoint
113113
/// Gets or sets the maximum number of consecutive reconnection attempts when an SSE stream is disconnected.
114114
/// </summary>
115115
/// <value>
116-
/// The maximum number of reconnection attempts. The default is 2.
116+
/// The maximum number of reconnection attempts. The default is 5.
117117
/// </value>
118118
/// <remarks>
119119
/// When an SSE stream is disconnected (e.g., due to a network issue), the client will attempt to
120120
/// reconnect using the Last-Event-ID header to resume from where it left off. This property controls
121-
/// how many reconnection attempts are made before giving up.
121+
/// how many consecutive reconnection attempts are made before giving up. The counter resets to zero
122+
/// on each successful stream read, so this value only limits consecutive failures.
122123
/// </remarks>
123-
public int MaxReconnectionAttempts { get; set; } = 2;
124+
public int MaxReconnectionAttempts { get; set; } = 5;
124125

125126
/// <summary>
126127
/// Gets or sets the default interval at which the client attempts reconnection after an SSE stream is disconnected.

0 commit comments

Comments
 (0)