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(); }