Skip to content

Commit 048c504

Browse files
author
a.stecher
committed
Curl shutdown check on progress.
1 parent e2b7f4e commit 048c504

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ext/curl/interface.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,9 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
602602
/* {{{ curl_progress */
603603
static int curl_progress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
604604
{
605-
/* 2. Check if we are in a "bailout" state (timeout) */
606-
if (EG(exception) || (EG(flags) & ZEN_EG_BAILOUT)) {
607-
return 1;
605+
/* 2. Do not call progress callback if we are in a shutdown state (eg. timeout)*/
606+
if (UNEXPECTED(EG(flags) & EG_FLAGS_IN_SHUTDOWN)) {
607+
return 0;
608608
}
609609

610610
php_curl *ch = (php_curl *)clientp;

0 commit comments

Comments
 (0)