Sanity Library Reference Docs
    Preparing search index...
    SanityLiveOnGoaway: (
        event: Extract<LiveEvent, { type: "goaway" }>,
        context: SanityLiveContext,
        setPollingInterval: (interval: number) => void,
    ) => void | Promise<void>

    Handles the Live Content API goaway event.

    This event means the API closed the live connection and will not deliver live events. This can happen when connection limits are reached. A polling refresh interval is the usual fallback; call setPollingInterval() from a custom handler to keep content fresh.

    Type declaration

      • (
            event: Extract<LiveEvent, { type: "goaway" }>,
            context: SanityLiveContext,
            setPollingInterval: (interval: number) => void,
        ): void | Promise<void>
      • Parameters

        Returns void | Promise<void>