Skip to main content

sse.onDisconnect()

Register one callback for continue-and-notify disconnect policy. Invoked at most once in the same isolate. Shares the original execution deadline; no extra time is granted. continue skips it and cancel disposes the isolate. Registration after disconnect still notifies once while execution remains alive. Callback failures appear in diagnostics. CPU-bound code, a hard timeout or process failure can prevent notification; this is not a durable cleanup guarantee.

Signature

Example

See all sse methods or runtime basics.
Last modified on November 8, 2026