Datastar aborts SSE on visibilitychange (tab hidden) and reconnects when visible. The previous cleanup-on-disconnect destroyed the context before the client could reconnect. Now SSE disconnect does a soft teardown (mark disconnected, keep context alive) and reconnect drains stale patches before resuming. The reaper uses disconnect time instead of creation time so recently-disconnected contexts aren't prematurely reaped.
23 KiB
23 KiB