Property AutoRestart
AutoRestart
Gets or sets whether to restart the subprocess automatically on unexpected termination.
public bool AutoRestart { get; set; }
Property Value
- bool
If
true, the transport will attempt to restart the subprocess when it terminates unexpectedly. Default isfalse.
Remarks
Auto-restart is useful for long-running applications that need resilience against transient server failures. When enabled:
- Pending requests are failed with a recoverable exception
- The subprocess is restarted after RestartDelay
- Maximum restart attempts are limited by MaxRestartAttempts
Note: The MCP session state is lost on restart. The client must re-initialize.