Re: [w3c/ServiceWorker] postMessage keeps service workers alive indefinitely (#980)

Chrome certainly kills service workers (that sounds so wrong) with a controlled Client open. It's done that since the early implementation.

We implemented the basic idea of https://github.com/w3c/ServiceWorker/issues/980#issuecomment-248920422. Each running service worker has a "max timeout" computed as the longest timeout of all its requests, and when a new message or foreign fetch request arrives, its timeout of the new request is clamped to the max timeout of the originating service worker, so it can't extend the overall lifetime beyond the originating worker's.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/980#issuecomment-314482956

Received on Tuesday, 11 July 2017 15:34:12 UTC