I have a long stream with many chunks being written approximately every 10s each. After about 30s the download is shown as finished but the result is partial. The service worker is stopped at the same time.
The problem is solved if in mitm.html I remove the condition on this piece of code:
if (!(data.readableStream || data.transferringReadable)) {
keepAlive()
}
It looks like even if data.readableStream or data.transferringReadable is available the keepalive mechanism is still necessary.
I have a long stream with many chunks being written approximately every 10s each. After about 30s the download is shown as finished but the result is partial. The service worker is stopped at the same time.
The problem is solved if in mitm.html I remove the condition on this piece of code:
It looks like even if data.readableStream or data.transferringReadable is available the keepalive mechanism is still necessary.