diff options
Diffstat (limited to 'vendor/sabre/http/lib/Sapi.php')
-rw-r--r-- | vendor/sabre/http/lib/Sapi.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/sabre/http/lib/Sapi.php b/vendor/sabre/http/lib/Sapi.php index f8e8397fc..55a4c46e7 100644 --- a/vendor/sabre/http/lib/Sapi.php +++ b/vendor/sabre/http/lib/Sapi.php @@ -115,6 +115,12 @@ class Sapi if ($copied <= 0) { break; } + // Abort on client disconnect. + // With ignore_user_abort(true), the script is not aborted on client disconnect. + // To avoid reading the entire stream and dismissing the data afterward, check between the chunks if the client is still there. + if (1 === ignore_user_abort() && 1 === connection_aborted()) { + break; + } $left -= $copied; } } else { |