closing sessions on api request to avoid locking requests
This commit is contained in:
parent
9fee1ef268
commit
fab4bb7b22
|
@ -9,6 +9,7 @@ class REST_Controller extends \WP_REST_Controller {
|
||||||
* REST_Controller constructor.
|
* REST_Controller constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
session_write_close();
|
||||||
$this->namespace = TAINACAN_REST_NAMESPACE;
|
$this->namespace = TAINACAN_REST_NAMESPACE;
|
||||||
add_action('rest_api_init', array($this, 'register_routes'));
|
add_action('rest_api_init', array($this, 'register_routes'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue