From 728b40b504f40175c9663f105964f212bca83c2e Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Sun, 29 Oct 2017 14:10:45 +0000 Subject: [PATCH] fastcgi_finish_request() (if sapi) --- lib/Download.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Download.php b/lib/Download.php index fb3eaf4..61ed2e2 100644 --- a/lib/Download.php +++ b/lib/Download.php @@ -170,8 +170,10 @@ class Download { static function launchNextDownload() { echo json_encode('Traitement'); - fastcgi_finish_request(); - + if ('cgi-fcgi' === php_sapi_name()) { + fastcgi_finish_request(); + } + $toDownload = self::findNextJob(); $toDownload->get(); }