Skip to content

Commit e2b7f4e

Browse files
author
a.stecher
committed
Add bailout check on curl progress.
1 parent 8398038 commit e2b7f4e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ext/curl/interface.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,11 @@ 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;
608+
}
609+
605610
php_curl *ch = (php_curl *)clientp;
606611
int rval = 0;
607612

0 commit comments

Comments
 (0)