Interface ReconnectOptions

Options for controlling SSE stream reconnection behavior.

interface ReconnectOptions {
    autoReconnect?: boolean;
    initialDelayMs?: number;
    maxAttempts?: number;
    maxDelayMs?: number;
}

Properties

autoReconnect?: boolean

Whether to automatically reconnect on stream loss.

true
initialDelayMs?: number

Initial delay before first reconnect attempt in ms.

1000
maxAttempts?: number

Maximum number of consecutive reconnect attempts before giving up.

Infinity
maxDelayMs?: number

Maximum delay between reconnect attempts in ms.

30000