diff --git a/src/wp-cron.php b/src/wp-cron.php index d704ceaf84..d487770f71 100644 --- a/src/wp-cron.php +++ b/src/wp-cron.php @@ -18,6 +18,11 @@ ignore_user_abort( true ); +/* Don't make the request block till we finish, if possible. */ +if ( function_exists( 'fastcgi_finish_request' ) && version_compare( phpversion(), '7.0.16', '>=' ) ) { + fastcgi_finish_request(); +} + if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'DOING_CRON' ) ) { die(); }