Fix session locking on async requests

This commit is contained in:
Ashley Rich 2016-09-15 19:05:16 +01:00
parent 33048e742c
commit fa66dfa935
1 changed files with 3 additions and 0 deletions

View File

@ -141,6 +141,9 @@ if ( ! class_exists( 'WP_Async_Request' ) ) {
* Check for correct nonce and pass to handler.
*/
public function maybe_handle() {
// Don't lock up other requests while processing
session_write_close();
check_ajax_referer( $this->identifier, 'nonce' );
$this->handle();