Skip to content
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

[stable24] Use modern API to cancel requests #1249

Merged
merged 1 commit into from
May 30, 2022

Conversation

backportbot-nextcloud[bot]
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented May 17, 2022

⚠️ This backport had conflicts and is incomplete ⚠️

backport of #1247

@backportbot-nextcloud backportbot-nextcloud bot added bug Something isn't working javascript Javascript related ticket labels May 17, 2022
@backportbot-nextcloud backportbot-nextcloud bot added this to the Nextcloud 24.0.1 milestone May 17, 2022
@skjnldsv skjnldsv added the 3. to review Waiting for reviews label May 17, 2022
@artonge
Copy link
Contributor

artonge commented May 17, 2022

/compile amend /

First click: open the viewer
Second click: close the viewer

But the second click does not correctly close the Viewer, as the method used to cancel the requests does not work.

This PR use modern API to cancel the requests. The requests are now correctly aborted, and the `openFile` method exit because the request call throws an exception.

Fix #893

https://axios-http.com/docs/cancellation
https://developer.mozilla.org/en-US/docs/Web/API/AbortController

Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@artonge artonge self-assigned this May 17, 2022
@blizzz blizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 19, 2022
@blizzz
Copy link
Member

blizzz commented May 20, 2022

runner 4 is having issues

@artonge artonge merged commit 2f81ea2 into stable24 May 30, 2022
@artonge artonge deleted the backport/1247/stable24 branch May 30, 2022 10:41
@blizzz blizzz mentioned this pull request Jun 9, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working javascript Javascript related ticket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants