-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(replay): Try to make flush on unload fully sync #6859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref(replay): Try to make flush on unload fully sync #6859
Conversation
size-limit report 📦
|
b14d60f
to
6dfb6e2
Compare
@billyvg feel free to merge this yourself if this appears good to you! |
The network request still gets cancelled, although I don't think the transport is using keepalive -- how would I confirm if it's using it or not? |
It should be using fetch's |
My best guess would be to start some requests that'd take a long time and perform a page navigation. This shouldn't cancel the requests. |
OK I added some logpoints to confirm when keepalive is true and it seems to work, although still getting some missing segments. |
This ties into the changes from here: #6859
Ahhh, the problem is actually this: #6910 We just didn't even call the sync flush when unloading the page 😅 I was kind of under the impression we had this, but I guess not! |
This PR adjusts #6854 to be fully sync.
I tried it in a test app, and it seemed to send the request out - I tried setting up a proxy to properly see logs, and it appeared correct, although not 100% sure if that matches real-world usage.