I have a Tauri app which calls some rust commands with the invoke
function a bunch of times.
The problem is that when the user changes the page while the request is still going, the request itself does not stop and keeps running in background, generating an error when it completes since the page I was supposed to display the result is not there anymore.
I tried to see if the invoke
function had an abort
method to stop the command when the page unloads but nothing.
Do you guys have any idea how to kill the promise of the invoke
when the user changes the page?