Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Prevent multiple simultaneous requests #131

Merged
merged 1 commit into from
May 16, 2020
Merged

Conversation

azaozz
Copy link
Contributor

@azaozz azaozz commented May 15, 2020

Prevents multiple simultaneous requests for the same plugin/theme if the user clicks on the link before the previous request is complete.

To test:

  • Make sure the network is not extremely fast (like when testing on local install).
    Maybe add sleep( 5 ); to wp-config.php if needed.
  • Open the browser tools, network tab, then click on the enable/disable link multiple times.

There should be only one request to admin-ajax.php at a time.

@audrasjb audrasjb self-requested a review May 15, 2020 22:47
@audrasjb audrasjb added this to the 0.8.1 milestone May 15, 2020
Copy link
Contributor

@audrasjb audrasjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this using a delay on my wp-config.php file and it worked fine.
Milestoning for 0.8.1.

@audrasjb audrasjb added the enhancement New feature or request label May 15, 2020
@azaozz azaozz merged commit 289854f into master May 16, 2020
@azaozz azaozz deleted the fix/prevent-multiple-requests branch May 16, 2020 21:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants