- From: Jungkee Song <notifications@github.com>
- Date: Mon, 02 Jan 2017 04:32:21 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 2 January 2017 12:32:56 UTC
Did you use a code pattern as described in the OP? Like:
```js
evt.waitUntil(p);
// Code can be defined to run on the final keep alive promise resolution that
// then keeps the SW alive again.
p.then(_ => {
// I think the spec says this should throw, but I thought we agreed this should work.
evt.waitUntil(fetch(evt.request));
});
```
Or the promise returned from `handlePush()` in your example - `evt.waitUntil(handlePush(evt.data));` - just settles after all the things are done? I think you'd better clarify the case by providing more detailed info as you encountered the problem described above: "SW stops mid way through this, and adding "waitUntil" in the way I described still did not make it finalize the task but stopped roughly at the same point".
--
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/1039#issuecomment-269966718
Received on Monday, 2 January 2017 12:32:56 UTC