Skip to content

fix(ipc): skip postMessage fallback on reload when custom protocol succeeded (fix #14154) - #15881

Open
namdamdoi68-oss wants to merge 1 commit into
tauri-apps:devfrom
namdamdoi68-oss:fix/ipc-skip-postmessage-fallback-on-reload
Open

fix(ipc): skip postMessage fallback on reload when custom protocol succeeded (fix #14154)#15881
namdamdoi68-oss wants to merge 1 commit into
tauri-apps:devfrom
namdamdoi68-oss:fix/ipc-skip-postmessage-fallback-on-reload

Conversation

@namdamdoi68-oss

Copy link
Copy Markdown

fixes #14154

When the WebView reloads while an async command is running, the custom
protocol fetch is aborted and the code falls back to postMessage, which
re-invokes the command.

Only fall back on the first custom protocol failure. If a custom protocol
request already succeeded once, a rejection during reload is an aborted
request, so it is not retried.

…cceeded

Only fall back to the postMessage interface on the first custom protocol failure. Once a custom protocol request has succeeded, a rejection during page reload is an aborted in-flight request, so falling back would run the command twice.

Signed-off-by: namdamdoi68-oss <namdamdoi68@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] The asynchronous command is re-invoked when the WebView reloads.

1 participant