From 1c7f428a842364246c6b6c6e1f45781acb1d85ca Mon Sep 17 00:00:00 2001 From: Leo Germani Date: Thu, 29 Nov 2018 11:45:07 -0200 Subject: [PATCH] closing sessions on api request to avoid locking requests --- src/api/class-tainacan-rest-controller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/class-tainacan-rest-controller.php b/src/api/class-tainacan-rest-controller.php index 564fb8527..15171f645 100644 --- a/src/api/class-tainacan-rest-controller.php +++ b/src/api/class-tainacan-rest-controller.php @@ -9,6 +9,7 @@ class REST_Controller extends \WP_REST_Controller { * REST_Controller constructor. */ public function __construct() { + session_write_close(); $this->namespace = TAINACAN_REST_NAMESPACE; add_action('rest_api_init', array($this, 'register_routes')); }