Table of Contents

Property AutoRestart

Namespace
LMKit.Mcp.Transport
Assembly
LM-Kit.NET.dll

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 is false.

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.