8000 [HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset() · symfony/http-client@848a70d · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"848a70d4f5321c006c1d9f6865aae93df4f49f50","url":"/symfony/http-client/commit/848a70d4f5321c006c1d9f6865aae93df4f49f50","authoredDate":"2022-01-13T16:11:29.000+01:00","committedDate":"2022-01-13T19:40:34.000+01:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003e[HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset()\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"","authors":[{"login":"nicolas-grekas","displayName":"Nicolas Grekas","avatarUrl":"https://avatars.githubusercontent.com/u/243674?v=4","path":"/nicolas-grekas","isGitHub":false}],"committerAttribution":false,"committer":{"login":"nicolas-grekas","displayName":"Nicolas Grekas","avatarUrl":"https://avatars.githubusercontent.com/u/243674?v=4","path":"/nicolas-grekas","isGitHub":false},"parents":["c4e28fc333914313b9d5eb1be9709c36880a158d"],"globalRelayId":"C_kwDOCmTc_9oAKDg0OGE3MGQ0ZjUzMjFjMDA2YzFkOWY2ODY1YWFlOTNkZjRmNDlmNTA","sha1":"c4e28fc333914313b9d5eb1be9709c36880a158d","sha2":"848a70d4f5321c006c1d9f6865aae93df4f49f50"},"currentUser":null,"repo":{"id":174382335,"defaultBranch":"7.3","name":"http-client","ownerLogin":"symfony","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2019-03-07T16:34:48.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/143937?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":167,"text":"@@ -168,7 +168,6 @@ public function request(string $method, string $url, array $options = []): Respo","html":"@@ -168,7 +168,6 @@ public function request(string $method, string $url, array $options = []): Respo","displayNoNewLineWarning":false,"position":0,"left":167,"right":167},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":168,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":1,"left":168,"right":168},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":169,"text":" if ($resolve \u0026\u0026 0x072A00 \u003e CurlClientState::$curlVersion['version_number']) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresolve\u003c/span\u003e \u0026amp;\u0026amp; \u003cspan class=pl-c1\u003e0x072A00\u003c/span\u003e \u0026gt; CurlClientState::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ecurlVersion\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eversion_number\u003c/span\u003e\u0026#39;\u003c/span\u003e]) {","displayNoNewLineWarning":false,"position":2,"left":169,"right":169},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":170,"text":" // DNS cache removals require curl 7.42 or higher","html":" \u003cspan class=pl-c\u003e// DNS cache removals require curl 7.42 or higher\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":170,"right":170},{"stylingDirective":null,"type":"DELETION","blobLineNumber":171,"text":"- // On lower versions, we have to create a new multi handle","html":"- \u003cspan class=pl-c\u003e// On lower versions, we have to create a new multi handle\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":171,"right":170},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":171,"text":" $this-\u003emulti-\u003ereset();","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003ereset\u003c/span\u003e();","displayNoNewLineWarning":false,"position":5,"left":172,"right":171},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":172,"text":" }","html":" }","displayNoNewLineWarning":false,"position":6,"left":173,"right":172},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":173,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":7,"left":174,"right":173},{"stylingDirective":null,"type":"HUNK","blobLineNumber":278,"text":"@@ -280,6 +279,7 @@ public function request(string $method, string $url, array $options = []): Respo","html":"@@ -280,6 +279,7 @@ public function request(string $method, string $url, array $options = []): Respo","displayNoNewLineWarning":false,"position":8,"left":279,"right":278},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":279,"text":" if (!$pushedResponse) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003epushedResponse\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":9,"left":280,"right":279},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":280,"text":" $ch = curl_init();","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e = \u003cspan class=pl-en\u003ecurl_init\u003c/span\u003e();","displayNoNewLineWarning":false,"position":10,"left":281,"right":280},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":281,"text":" $this-\u003elogger \u0026\u0026 $this-\u003elogger-\u003einfo(sprintf('Request: \"%s %s\"', $method, $url));","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elogger\u003c/span\u003e \u0026amp;\u0026amp; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elogger\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003einfo\u003c/span\u003e(\u003cspan class=pl-en\u003esprintf\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eRequest: \u0026quot;%s %s\u0026quot;\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emethod\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eurl\u003c/span\u003e));","displayNoNewLineWarning":false,"position":11,"left":282,"right":281},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":282,"text":"+ $curlopts += [\\CURLOPT_SHARE =\u003e $this-\u003emulti-\u003eshare];","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ecurlopts\u003c/span\u003e += [\\\u003cspan class=pl-c1\u003eCURLOPT_SHARE\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eshare\u003c/span\u003e];","displayNoNewLineWarning":false,"position":12,"left":282,"right":282},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":283,"text":" }","html":" }","displayNoNewLineWarning":false,"position":13,"left":283,"right":283},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":284,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":14,"left":284,"right":284},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":285,"text":" foreach ($curlopts as $opt =\u003e $value) {","html":" \u003cspan class=pl-k\u003eforeach\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ecurlopts\u003c/span\u003e \u003cspan class=pl-k\u003eas\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eopt\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003evalue\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":15,"left":285,"right":285},{"stylingDirective":null,"type":"HUNK","blobLineNumber":305,"text":"@@ -306,9 +306,9 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa","html":"@@ -306,9 +306,9 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa","displayNoNewLineWarning":false,"position":16,"left":305,"right":305},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":306,"text":" throw new \\TypeError(sprintf('\"%s()\" expects parameter 1 to be an iterable of CurlResponse objects, \"%s\" given.', __METHOD__, \\is_object($responses) ? \\get_class($responses) : \\gettype($responses)));","html":" \u003cspan class=pl-k\u003ethrow\u003c/span\u003e \u003cspan class=pl-k\u003enew\u003c/span\u003e \\\u003cspan class=pl-v\u003eTypeError\u003c/span\u003e(\u003cspan class=pl-en\u003esprintf\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e\u0026quot;%s()\u0026quot; expects parameter 1 to be an iterable of CurlResponse objects, \u0026quot;%s\u0026quot; given.\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-c1\u003e__METHOD__\u003c/span\u003e, \u003cspan class=pl-en\u003e\\is_object\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponses\u003c/span\u003e) ? \u003cspan class=pl-en\u003e\\get_class\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponses\u003c/span\u003e) : \u003cspan class=pl-en\u003e\\gettype\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponses\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":17,"left":306,"right":306},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":307,"text":" }","html":" }","displayNoNewLineWarning":false,"position":18,"left":307,"right":307},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":308,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":19,"left":308,"right":308},{"stylingDirective":null,"type":"DELETION","blobLineNumber":309,"text":"- if (\\is_resource($mh = $this-\u003emulti-\u003ehandles[0] ?? null) || $mh instanceof \\CurlMultiHandle) {","html":"- \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-en\"\u003e\\is_resource\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first\"\u003emh\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e = \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x x-last\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first\"\u003ehandles\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e0\u003c/span\u003e\u003cspan class=\"x\"\u003e] ?? \u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003enull\u003c/span\u003e) || \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003emh\u003c/span\u003e\u003c/span\u003e \u003cspan class=\"pl-k\"\u003einstanceof\u003c/span\u003e \\CurlMultiHandle) {","displayNoNewLineWarning":false,"position":20,"left":309,"right":308},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":309,"text":"+ if (\\is_resource($this-\u003emulti-\u003ehandle) || $this-\u003emulti-\u003ehandle instanceof \\CurlMultiHandle) {","html":"+ \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-en\"\u003e\\is_resource\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first x-last\"\u003ehandle\u003c/span\u003e) || \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi x x-first\"\u003ethis\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003emulti\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003ehandle\u003c/span\u003e \u003cspan class=\"pl-k\"\u003einstanceof\u003c/span\u003e \\CurlMultiHandle) {","displayNoNewLineWarning":false,"position":21,"left":309,"right":309},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":310,"text":" $active = 0;","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eactive\u003c/span\u003e = \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":22,"left":310,"right":310},{"stylingDirective":null,"type":"DELETION","blobLineNumber":311,"text":"- while (\\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($mh, $active)) {","html":"- \u003cspan class=\"pl-k\"\u003ewhile\u003c/span\u003e (\\\u003cspan class=\"pl-c1\"\u003eCURLM_CALL_MULTI_PERFORM\u003c/span\u003e === \u003cspan class=\"pl-en\"\u003ecurl_multi_exec\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003emh\u003c/span\u003e\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eactive\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":23,"left":311,"right":310},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":311,"text":"+ while (\\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($this-\u003emulti-\u003ehandle, $active)) {","html":"+ \u003cspan class=\"pl-k\"\u003ewhile\u003c/span\u003e (\\\u003cspan class=\"pl-c1\"\u003eCURLM_CALL_MULTI_PERFORM\u003c/span\u003e === \u003cspan class=\"pl-en\"\u003ecurl_multi_exec\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi x x-first\"\u003ethis\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003emulti\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003ehandle\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eactive\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":24,"left":311,"right":311},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":312,"text":" }","html":" }","displayNoNewLineWarning":false,"position":25,"left":312,"right":312},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":313,"text":" }","html":" }","displayNoNewLineWarning":false,"position":26,"left":313,"right":313},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":314,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":27,"left":314,"right":314}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":410,"linesChanged":6,"newTreeEntry":{"lineCount":410,"path":"CurlHttpClient.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"CurlHttpClient.php","mode":100644},"linesAdded":3,"linesDeleted":3,"path":"CurlHttpClient.php","pathDigest":"bdd23c4eaed46a788021c43d05f9a587842433986fc18f4faff9eb11673c5741","status":"MODIFIED","truncatedReason":null,"oldOid":"c4e28fc333914313b9d5eb1be9709c36880a158d","newOid":"848a70d4f5321c006c1d9f6865aae93df4f49f50","copilotChatReference":null,"deletedSha":"c4e28fc333914313b9d5eb1be9709c36880a158d","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":22,"text":"@@ -23,8 +23,10 @@","html":"@@ -23,8 +23,10 @@","displayNoNewLineWarning":false,"position":0,"left":22,"right":22},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":23,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":23,"right":23},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":24,"text":" final class CurlClientState extends ClientState","html":" \u003cspan class=pl-k\u003efinal\u003c/span\u003e \u003cspan class=pl-k\u003eclass\u003c/span\u003e CurlClientState \u003cspan class=pl-k\u003eextends\u003c/span\u003e ClientState","displayNoNewLineWarning":false,"position":2,"left":24,"right":24},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":25,"text":" {","html":" {","displayNoNewLineWarning":false,"position":3,"left":25,"right":25},{"stylingDirective":null,"type":"DELETION","blobLineNumber":26,"text":"- /** @var array\u003c\\CurlMultiHandle|resource\u003e */","html":"- \u003cspan class=pl-c\u003e/** @var array\u0026lt;\\CurlMultiHandle|resource\u0026gt; */\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":26,"right":25},{"stylingDirective":null,"type":"DELETION","blobLineNumber":27,"text":"- public $handles = [];","html":"- \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-c1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ehandles\u003c/span\u003e = [];","displayNoNewLineWarning":false,"position":5,"left":27,"right":25},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":26,"text":"+ /** @var \\CurlMultiHandle|resource */","html":"+ \u003cspan class=pl-c\u003e/** @var \\CurlMultiHandle|resource */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":27,"right":26},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":27,"text":"+ public $handle;","html":"+ \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-c1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ehandle\u003c/span\u003e;","displayNoNewLineWarning":false,"position":7,"left":27,"right":27},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":28,"text":"+ /** @var \\CurlShareHandle|resource */","html":"+ \u003cspan class=pl-c\u003e/** @var \\CurlShareHandle|resource */\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":27,"right":28},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":29,"text":"+ public $share;","html":"+ \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-c1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eshare\u003c/span\u003e;","displayNoNewLineWarning":false,"position":9,"left":27,"right":29},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":30,"text":" /** @var PushedResponse[] */","html":" \u003cspan class=pl-c\u003e/** @var PushedResponse[] */\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":28,"right":30},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":31,"text":" public $pushedResponses = [];","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-c1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003epushedResponses\u003c/span\u003e = [];","displayNoNewLineWarning":false,"position":11,"left":29,"right":31},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":32,"text":" /** @var DnsCache */","html":" \u003cspan class=pl-c\u003e/** @var DnsCache */\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":30,"right":32},{"stylingDirective":null,"type":"HUNK","blobLineNumber":35,"text":"@@ -34,27 +36,23 @@ final class CurlClientState extends ClientState","html":"@@ -34,27 +36,23 @@ final class CurlClientState extends ClientState","displayNoNewLineWarning":false,"position":13,"left":33,"right":35},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":36,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":14,"left":34,"right":36},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":37,"text":" public static $curlVersion;","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-c1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ecurlVersion\u003c/span\u003e;","displayNoNewLineWarning":false,"position":15,"left":35,"right":37},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":38,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":16,"left":36,"right":38},{"stylingDirective":null,"type":"DELETION","blobLineNumber":37,"text":"- private $maxHostConnections;","html":"- \u003cspan class=pl-k\u003eprivate\u003c/span\u003e \u003cspan class=pl-c1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e;","displayNoNewLineWarning":false,"position":17,"left":37,"right":38},{"stylingDirective":null,"type":"DELETION","blobLineNumber":38,"text":"- private $maxPendingPushes;","html":"- \u003cspan class=pl-k\u003eprivate\u003c/span\u003e \u003cspan class=pl-c1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxPendingPushes\u003c/span\u003e;","displayNoNewLineWarning":false,"position":18,"left":38,"right":38},{"stylingDirective":null,"type":"DELETION","blobLineNumber":39,"text":"-","html":"-","displayNoNewLineWarning":false,"position":19,"left":39,"right":38},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":39,"text":" public function __construct(int $maxHostConnections, int $maxPendingPushes)","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003e__construct\u003c/span\u003e(\u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxPendingPushes\u003c/span\u003e)","displayNoNewLineWarning":false,"position":20,"left":40,"right":39},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":40,"text":" {","html":" {","displayNoNewLineWarning":false,"position":21,"left":41,"right":40},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":41,"text":" self::$curlVersion = self::$curlVersion ?? curl_version();","html":" \u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ecurlVersion\u003c/span\u003e = \u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ecurlVersion\u003c/span\u003e ?? \u003cspan class=pl-en\u003ecurl_version\u003c/span\u003e();","displayNoNewLineWarning":false,"position":22,"left":42,"right":41},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":42,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":23,"left":43,"right":42},{"stylingDirective":null,"type":"DELETION","blobLineNumber":44,"text":"- array_unshift($this-\u003ehandles, $mh = curl_multi_init());","html":"- \u003cspan class=\"pl-en x x-first\"\u003earray_unshift\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first\"\u003ehandles\u003c/span\u003e\u003cspan class=\"x\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003emh\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e \u003c/span\u003e= \u003cspan class=\"pl-en\"\u003ecurl_multi_init\u003c/span\u003e(\u003cspan class=\"x x-first x-last\"\u003e)\u003c/span\u003e);","displayNoNewLineWarning":false,"position":24,"left":44,"right":42},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":43,"text":"+ $this-\u003ehandle = curl_multi_init();","html":"+ \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first\"\u003ehandle\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e \u003c/span\u003e= \u003cspan class=\"pl-en\"\u003ecurl_multi_init\u003c/span\u003e();","displayNoNewLineWarning":false,"position":25,"left":44,"right":43},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":44,"text":" $this-\u003ednsCache = new DnsCache();","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ednsCache\u003c/span\u003e = \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eDnsCache\u003c/span\u003e();","displayNoNewLineWarning":false,"position":26,"left":45,"right":44},{"stylingDirective":null,"type":"DELETION","blobLineNumber":46,"text":"- $this-\u003emaxHostConnections = $maxHostConnections;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003emaxHostConnections\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e;","displayNoNewLineWarning":false,"position":27,"left":46,"right":44},{"stylingDirective":null,"type":"DELETION","blobLineNumber":47,"text":"- $this-\u003emaxPendingPushes = $maxPendingPushes;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003emaxPendingPushes\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxPendingPushes\u003c/span\u003e;","displayNoNewLineWarning":false,"position":28,"left":47,"right":44},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":45,"text":"+ $this-\u003ereset();","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003ereset\u003c/span\u003e();","displayNoNewLineWarning":false,"position":29,"left":47,"right":45},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":46,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":30,"left":48,"right":46},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":47,"text":" // Don't enable HTTP/1.1 pipelining: it forces responses to be sent in order","html":" \u003cspan class=pl-c\u003e// Don\u0026#39;t enable HTTP/1.1 pipelining: it forces responses to be sent in order\u003c/span\u003e","displayNoNewLineWarning":false,"position":31,"left":49,"right":47},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":48,"text":" if (\\defined('CURLPIPE_MULTIPLEX')) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003e\\defined\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eCURLPIPE_MULTIPLEX\u003c/span\u003e\u0026#39;\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":32,"left":50,"right":48},{"stylingDirective":null,"type":"DELETION","blobLineNumber":51,"text":"- curl_multi_setopt($mh, \\CURLMOPT_PIPELINING, \\CURLPIPE_MULTIPLEX);","html":"- \u003cspan class=\"pl-en\"\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003emh\u003c/span\u003e\u003c/span\u003e, \\\u003cspan class=\"pl-c1\"\u003eCURLMOPT_PIPELINING\u003c/span\u003e, \\\u003cspan class=\"pl-c1\"\u003eCURLPIPE_MULTIPLEX\u003c/span\u003e);","displayNoNewLineWarning":false,"position":33,"left":51,"right":48},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":49,"text":"+ curl_multi_setopt($this-\u003ehandle, \\CURLMOPT_PIPELINING, \\CURLPIPE_MULTIPLEX);","html":"+ \u003cspan class=\"pl-en\"\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi x x-first\"\u003ethis\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003ehandle\u003c/span\u003e, \\\u003cspan class=\"pl-c1\"\u003eCURLMOPT_PIPELINING\u003c/span\u003e, \\\u003cspan class=\"pl-c1\"\u003eCURLPIPE_MULTIPLEX\u003c/span\u003e);","displayNoNewLineWarning":false,"position":34,"left":51,"right":49},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":50,"text":" }","html":" }","displayNoNewLineWarning":false,"position":35,"left":52,"right":50},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":51,"text":" if (\\defined('CURLMOPT_MAX_HOST_CONNECTIONS')) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003e\\defined\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eCURLMOPT_MAX_HOST_CONNECTIONS\u003c/span\u003e\u0026#39;\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":36,"left":53,"right":51},{"stylingDirective":null,"type":"DELETION","blobLineNumber":54,"text":"- $maxHostConnections = curl_multi_setopt($mh, \\CURLMOPT_MAX_HOST_CONNECTIONS, 0 \u003c $maxHostConnections ? $maxHostConnections : \\PHP_INT_MAX) ? 0 : $maxHostConnections;","html":"- \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e = \u003cspan class=\"pl-en\"\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003emh\u003c/span\u003e\u003c/span\u003e, \\\u003cspan class=\"pl-c1\"\u003eCURLMOPT_MAX_HOST_CONNECTIONS\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e \u0026lt; \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e ? \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e : \\\u003cspan class=\"pl-c1\"\u003ePHP_INT_MAX\u003c/span\u003e) ? \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e : \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e;","displayNoNewLineWarning":false,"position":37,"left":54,"right":51},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":52,"text":"+ $maxHostConnections = curl_multi_setopt($this-\u003ehandle, \\CURLMOPT_MAX_HOST_CONNECTIONS, 0 \u003c $maxHostConnections ? $maxHostConnections : \\PHP_INT_MAX) ? 0 : $maxHostConnections;","html":"+ \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e = \u003cspan class=\"pl-en\"\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi x x-first\"\u003ethis\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003ehandle\u003c/span\u003e, \\\u003cspan class=\"pl-c1\"\u003eCURLMOPT_MAX_HOST_CONNECTIONS\u003c/span\u003e, \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e \u0026lt; \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e ? \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e : \\\u003cspan class=\"pl-c1\"\u003ePHP_INT_MAX\u003c/span\u003e) ? \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e : \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e;","displayNoNewLineWarning":false,"position":38,"left":54,"right":52},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":53,"text":" }","html":" }","displayNoNewLineWarning":false,"position":39,"left":55,"right":53},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":54,"text":" if (\\defined('CURLM 8000 OPT_MAXCONNECTS') \u0026\u0026 0 \u003c $maxHostConnections) {","html":" \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003e\\defined\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eCURLMOPT_MAXCONNECTS\u003c/span\u003e\u0026#39;\u003c/span\u003e) \u0026amp;\u0026amp; \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u0026lt; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":40,"left":56,"right":54},{"stylingDirective":null,"type":"DELETION","blobLineNumber":57,"text":"- curl_multi_setopt($mh, \\CURLMOPT_MAXCONNECTS, $maxHostConnections);","html":"- \u003cspan class=\"pl-en\"\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003emh\u003c/span\u003e\u003c/span\u003e, \\\u003cspan class=\"pl-c1\"\u003eCURLMOPT_MAXCONNECTS\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e);","displayNoNewLineWarning":false,"position":41,"left":57,"right":54},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":55,"text":"+ curl_multi_setopt($this-\u003ehandle, \\CURLMOPT_MAXCONNECTS, $maxHostConnections);","html":"+ \u003cspan class=\"pl-en\"\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"pl-smi x x-first\"\u003ethis\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003ehandle\u003c/span\u003e, \\\u003cspan class=\"pl-c1\"\u003eCURLMOPT_MAXCONNECTS\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emaxHostConnections\u003c/span\u003e);","displayNoNewLineWarning":false,"position":42,"left":57,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" }","html":" }","displayNoNewLineWarning":false,"position":43,"left":58,"right":56},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":57,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":44,"left":59,"right":57},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":58,"text":" // Skip configuring HTTP/2 push when it's unsupported or buggy, see https://bugs.php.net/77535","html":" \u003cspan class=pl-c\u003e// Skip configuring HTTP/2 push when it\u0026#39;s unsupported or buggy, see https://bugs.php.net/77535\u003c/span\u003e","displayNoNewLineWarning":false,"position":45,"left":60,"right":58},{"stylingDirective":null,"type":"HUNK","blobLineNumber":64,"text":"@@ -67,40 +65,31 @@ public function __construct(int $maxHostConnections, int $maxPendingPushes)","html":"@@ -67,40 +65,31 @@ public function __construct(int $maxHostConnections, int $maxPendingPushes)","displayNoNewLineWarning":false,"position":46,"left":66,"right":64},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":65,"text":" return;","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":47,"left":67,"right":65},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":66,"text":" }","html":" }","displayNoNewLineWarning":false,"position":48,"left":68,"right":66},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":67,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":49,"left":69,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":70,"text":"- // Clone to prevent a circular reference","html":"- \u003cspan class=pl-c\u003e// Clone to prevent a circular reference\u003c/span\u003e","displayNoNewLineWarning":false,"position":50,"left":70,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":71,"text":"- $multi = clone $this;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e = \u003cspan class=pl-k\u003eclone\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e;","displayNoNewLineWarning":false,"position":51,"left":71,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":72,"text":"- $multi-\u003ehandles = [$mh];","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandles\u003c/span\u003e = [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e];","displayNoNewLineWarning":false,"position":52,"left":72,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":73,"text":"- $multi-\u003epushedResponses = \u0026$this-\u003epushedResponses;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003epushedResponses\u003c/span\u003e = \u0026amp;\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003epushedResponses\u003c/span\u003e;","displayNoNewLineWarning":false,"position":53,"left":73,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":74,"text":"- $multi-\u003elogger = \u0026$this-\u003elogger;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elogger\u003c/span\u003e = \u0026amp;\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elogger\u003c/span\u003e;","displayNoNewLineWarning":false,"position":54,"left":74,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":75,"text":"- $multi-\u003ehandlesActivity = \u0026$this-\u003ehandlesActivity;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandlesActivity\u003c/span\u003e = \u0026amp;\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandlesActivity\u003c/span\u003e;","displayNoNewLineWarning":false,"position":55,"left":75,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":76,"text":"- $multi-\u003eopenHandles = \u0026$this-\u003eopenHandles;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eopenHandles\u003c/span\u003e = \u0026amp;\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eopenHandles\u003c/span\u003e;","displayNoNewLineWarning":false,"position":56,"left":76,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":77,"text":"- $multi-\u003elastTimeout = \u0026$this-\u003elastTimeout;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elastTimeout\u003c/span\u003e = \u0026amp;\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elastTimeout\u003c/span\u003e;","displayNoNewLineWarning":false,"position":57,"left":77,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":78,"text":"-","html":"-","displayNoNewLineWarning":false,"position":58,"left":78,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":79,"text":"- curl_multi_setopt($mh, \\CURLMOPT_PUSHFUNCTION, static function ($parent, $pushed, array $requestHeaders) use ($multi, $maxPendingPushes) {","html":"- \u003cspan class=pl-en\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLMOPT_PUSHFUNCTION\u003c/span\u003e, \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eparent\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003epushed\u003c/span\u003e, \u003cspan class=pl-smi\u003earray\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003erequestHeaders\u003c/span\u003e) \u003cspan class=pl-k\u003euse\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxPendingPushes\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":59,"left":79,"right":67},{"stylingDirective":null,"type":"DELETION","blobLineNumber":80,"text":"- return $multi-\u003ehandlePush($parent, $pushed, $requestHeaders, $maxPendingPushes);","html":"- \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003ehandlePush\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eparent\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003epushed\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003erequestHeaders\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxPendingPushes\u003c/span\u003e);","displayNoNewLineWarning":false,"position":60,"left":80,"right":67},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":68,"text":"+ curl_multi_setopt($this-\u003ehandle, \\CURLMOPT_PUSHFUNCTION, function ($parent, $pushed, array $requestHeaders) use ($maxPendingPushes) {","html":"+ \u003cspan class=pl-en\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLMOPT_PUSHFUNCTION\u003c/span\u003e, \u003cspan class=pl-k\u003efunction\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eparent\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003epushed\u003c/span\u003e, \u003cspan class=pl-smi\u003earray\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003erequestHeaders\u003c/span\u003e) \u003cspan class=pl-k\u003euse\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxPendingPushes\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":61,"left":80,"right":68},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":69,"text":"+ return $this-\u003ehandlePush($parent, $pushed, $requestHeaders, $maxPendingPushes);","html":"+ \u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003ehandlePush\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eparent\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003epushed\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003erequestHeaders\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxPendingPushes\u003c/span\u003e);","displayNoNewLineWarning":false,"position":62,"left":80,"right":69},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":70,"text":" });","html":" });","displayNoNewLineWarning":false,"position":63,"left":81,"right":70},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":71,"text":" }","html":" }","displayNoNewLineWarning":false,"position":64,"left":82,"right":71},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":72,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":65,"left":83,"right":72},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":73,"text":" public function reset()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003ereset\u003c/span\u003e()","displayNoNewLineWarning":false,"position":66,"left":84,"right":73},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":74,"text":" {","html":" {","displayNoNewLineWarning":false,"position":67,"left":85,"right":74},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":75,"text":" foreach ($this-\u003epushedResponses as $url =\u003e $response) {","html":" \u003cspan class=pl-k\u003eforeach\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003epushedResponses\u003c/span\u003e \u003cspan class=pl-k\u003eas\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eurl\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":68,"left":86,"right":75},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":76,"text":" $this-\u003elogger \u0026\u0026 $this-\u003elogger-\u003edebug(sprintf('Unused pushed response: \"%s\"', $url));","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elogger\u003c/span\u003e \u0026amp;\u0026amp; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elogger\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003edebug\u003c/span\u003e(\u003cspan class=pl-en\u003esprintf\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eUnused pushed response: \u0026quot;%s\u0026quot;\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eurl\u003c/span\u003e));","displayNoNewLineWarning":false,"position":69,"left":87,"right":76},{"stylingDirective":null,"type":"DELETION","blobLineNumber":88,"text":"-","html":"-","displayNoNewLineWarning":false,"position":70,"left":88,"right":76},{"stylingDirective":null,"type":"DELETION","blobLineNumber":89,"text":"- foreach ($this-\u003ehandles as $mh) {","html":"- \u003cspan class=pl-k\u003eforeach\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandles\u003c/span\u003e \u003cspan class=pl-k\u003eas\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":71,"left":89,"right":76},{"stylingDirective":null,"type":"DELETION","blobLineNumber":90,"text":"- curl_multi_remove_handle($mh, $response-\u003ehandle);","html":"- \u003cspan class=pl-en\u003ecurl_multi_remove_handle\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e);","displayNoNewLineWarning":false,"position":72,"left":90,"right":76},{"stylingDirective":null,"type":"DELETION","blobLineNumber":91,"text":"- }","html":"- }","displayNoNewLineWarning":false,"position":73,"left":91,"right":76},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":77,"text":"+ curl_multi_remove_handle($this-\u003ehandle, $response-\u003ehandle);","html":"+ \u003cspan class=pl-en\u003ecurl_multi_remove_handle\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e);","displayNoNewLineWarning":false,"position":74,"left":91,"right":77},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":78,"text":" curl_close($response-\u003ehandle);","html":" \u003cspan class=pl-en\u003ecurl_close\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e);","displayNoNewLineWarning":false,"position":75,"left":92,"right":78},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":79,"text":" }","html":" }","displayNoNewLineWarning":false,"position":76,"left":93,"right":79},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":80,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":77,"left":94,"right":80},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":81,"text":" $this-\u003epushedResponses = [];","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003epushedResponses\u003c/span\u003e = [];","displayNoNewLineWarning":false,"position":78,"left":95,"right":81},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":82,"text":" $this-\u003ednsCache-\u003eevictions = $this-\u003ednsCache-\u003eevictions ?: $this-\u003ednsCache-\u003eremovals;","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ednsCache\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eevictions\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ednsCache\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eevictions\u003c/span\u003e ?: \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ednsCache\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eremovals\u003c/span\u003e;","displayNoNewLineWarning":false,"position":79,"left":96,"right":82},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":83,"text":" $this-\u003ednsCache-\u003eremovals = $this-\u003ednsCache-\u003ehostnames = [];","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ednsCache\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eremovals\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ednsCache\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehostnames\u003c/span\u003e = [];","displayNoNewLineWarning":false,"position":80,"left":97,"right":83},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":84,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":81,"left":98,"right":84},{"stylingDirective":null,"type":"DELETION","blobLineNumber":99,"text":"- if (\\defined('CURLMOPT_PUSHFUNCTION')) {","html":"- \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003e\\defined\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eCURLMOPT_PUSHFUNCTION\u003c/span\u003e\u0026#39;\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":82,"left":99,"right":84},{"stylingDirective":null,"type":"DELETION","blobLineNumber":100,"text":"- curl_multi_setopt($this-\u003ehandles[0], \\CURLMOPT_PUSHFUNCTION, null);","html":"- \u003cspan class=pl-en\u003ecurl_multi_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandles\u003c/span\u003e[\u003cspan class=pl-c1\u003e0\u003c/span\u003e], \\\u003cspan class=pl-c1\u003eCURLMOPT_PUSHFUNCTION\u003c/span\u003e, \u003cspan class=pl-c1\u003enull\u003c/span\u003e);","displayNoNewLineWarning":false,"position":83,"left":100,"right":84},{"stylingDirective":null,"type":"DELETION","blobLineNumber":101,"text":"- }","html":"- }","displayNoNewLineWarning":false,"position":84,"left":101,"right":84},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":85,"text":"+ $this-\u003eshare = curl_share_init();","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eshare\u003c/span\u003e = \u003cspan class=pl-en\u003ecurl_share_init\u003c/span\u003e();","displayNoNewLineWarning":false,"position":85,"left":101,"right":85},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":86,"text":"+","html":"+","displayNoNewLineWarning":false,"position":86,"left":101,"right":86},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":87,"text":"+ curl_share_setopt($this-\u003eshare, \\CURLSHOPT_SHARE, \\CURL_LOCK_DATA_DNS);","html":"+ \u003cspan class=pl-en\u003ecurl_share_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eshare\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLSHOPT_SHARE\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURL_LOCK_DATA_DNS\u003c/span\u003e);","displayNoNewLineWarning":false,"position":87,"left":101,"right":87},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":88,"text":"+ curl_share_setopt($this-\u003eshare, \\CURLSHOPT_SHARE, \\CURL_LOCK_DATA_SSL_SESSION);","html":"+ \u003cspan class=pl-en\u003ecurl_share_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eshare\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLSHOPT_SHARE\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURL_LOCK_DATA_SSL_SESSION\u003c/span\u003e);","displayNoNewLineWarning":false,"position":88,"left":101,"right":88},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":89,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":89,"left":102,"right":89},{"stylingDirective":null,"type":"DELETION","blobLineNumber":103,"text":"- $this-\u003e__construct($this-\u003emaxHostConnections, $this-\u003emaxPendingPushes);","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003e__construct\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003emaxHostConnections\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003emaxPendingPushes\u003c/span\u003e);","displayNoNewLineWarning":false,"position":90,"left":103,"right":89},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":90,"text":"+ if (\\defined('CURL_LOCK_DATA_CONNECT')) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003e\\defined\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eCURL_LOCK_DATA_CONNECT\u003c/span\u003e\u0026#39;\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":91,"left":103,"right":90},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":91,"text":"+ curl_share_setopt($this-\u003eshare, \\CURLSHOPT_SHARE, \\CURL_LOCK_DATA_CONNECT);","html":"+ \u003cspan class=pl-en\u003ecurl_share_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eshare\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLSHOPT_SHARE\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURL_LOCK_DATA_CONNECT\u003c/span\u003e);","displayNoNewLineWarning":false,"position":92,"left":103,"right":91},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":92,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":93,"left":103,"right":92},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":93,"text":" }","html":" }","displayNoNewLineWarning":false,"position":94,"left":104,"right":93},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":94,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":95,"left":105,"right":94},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":95,"text":" private function handlePush($parent, $pushed, array $requestHeaders, int $maxPendingPushes): int","html":" \u003cspan class=pl-k\u003eprivate\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003ehandlePush\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eparent\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003epushed\u003c/span\u003e, \u003cspan class=pl-smi\u003earray\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003erequestHeaders\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emaxPendingPushes\u003c/span\u003e): \u003cspan class=pl-smi\u003eint\u003c/span\u003e","displayNoNewLineWarning":false,"position":96,"left":106,"right":95}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":136,"linesChanged":49,"newTreeEntry":{"lineCount":136,"path":"Internal/CurlClientState.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Internal/CurlClientState.php","mode":100644},"linesAdded":19,"linesDeleted":30,"path":"Internal/CurlClientState.php","pathDigest":"0bc7d2a4e46ecd45644280c6cfc77316d35f97c11f1a2cd9ad4d09bd7d70f8a8","status":"MODIFIED","truncatedReason":null,"oldOid":"c4e28fc333914313b9d5eb1be9709c36880a158d","newOid":"848a70d4f5321c006c1d9f6865aae93df4f49f50","copilotChatReference":null,"deletedSha":"c4e28fc333914313b9d5eb1be9709c36880a158d","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":149,"text":"@@ -150,7 +150,7 @@ public function __construct(CurlClientState $multi, $ch, array $options = null,","html":"@@ -150,7 +150,7 @@ public function __construct(CurlClientState $multi, $ch, array $options = null,","displayNoNewLineWarning":false,"position":0,"left":149,"right":149},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":150,"text":" // Schedule the request in a non-blocking way","html":" \u003cspan class=pl-c\u003e// Schedule the request in a non-blocking way\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":150,"right":150},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":151,"text":" $multi-\u003elastTimeout = null;","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003elastTimeout\u003c/span\u003e = \u003cspan class=pl-c1\u003enull\u003c/span\u003e;","displayNoNewLineWarning":false,"position":2,"left":151,"right":151},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":152,"text":" $multi-\u003eopenHandles[$id] = [$ch, $options];","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eopenHandles\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e] = [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eoptions\u003c/span\u003e];","displayNoNewLineWarning":false,"position":3,"left":152,"right":152},{"stylingDirective":null,"type":"DELETION","blobLineNumber":153,"text":"- curl_multi_add_handle($multi-\u003ehandles[0], $ch);","html":"- \u003cspan class=\"pl-en\"\u003ecurl_multi_add_handle\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first\"\u003ehandles\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e0\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e]\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ech\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":153,"right":152},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":153,"text":"+ curl_multi_add_handle($multi-\u003ehandle, $ch);","html":"+ \u003cspan class=\"pl-en\"\u003ecurl_multi_add_handle\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first x-last\"\u003ehandle\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ech\u003c/span\u003e);","displayNoNewLineWarning":false,"position":5,"left":153,"right":153},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":154,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":6,"left":154,"right":154},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":155,"text":" $this-\u003ecanary = new Canary(static function () use ($ch, $multi, $id) {","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003e\u003cspan class=pl-smi\u003ethis\u003c/span\u003e\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ecanary\u003c/span\u003e = \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eCanary\u003c/span\u003e(\u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e () \u003cspan class=pl-k\u003euse\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":7,"left":155,"right":155},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":156,"text":" unset($multi-\u0 8000 03eopenHandles[$id], $multi-\u003ehandlesActivity[$id]);","html":" unset(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eopenHandles\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e], \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandlesActivity\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e]);","displayNoNewLineWarning":false,"position":8,"left":156,"right":156},{"stylingDirective":null,"type":"HUNK","blobLineNumber":159,"text":"@@ -160,9 +160,7 @@ public function __construct(CurlClientState $multi, $ch, array $options = null,","html":"@@ -160,9 +160,7 @@ public function __construct(CurlClientState $multi, $ch, array $options = null,","displayNoNewLineWarning":false,"position":9,"left":159,"right":159},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":160,"text":" return;","html":" \u003cspan class=pl-k\u003ereturn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":10,"left":160,"right":160},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":161,"text":" }","html":" }","displayNoNewLineWarning":false,"position":11,"left":161,"right":161},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":162,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":12,"left":162,"right":162},{"stylingDirective":null,"type":"DELETION","blobLineNumber":163,"text":"- foreach ($multi-\u003ehandles as $mh) {","html":"- \u003cspan class=pl-k\u003eforeach\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandles\u003c/span\u003e \u003cspan class=pl-k\u003eas\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":13,"left":163,"right":162},{"stylingDirective":null,"type":"DELETION","blobLineNumber":164,"text":"- curl_multi_remove_handle($mh, $ch);","html":"- \u003cspan class=pl-en\u003ecurl_multi_remove_handle\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e);","displayNoNewLineWarning":false,"position":14,"left":164,"right":162},{"stylingDirective":null,"type":"DELETION","blobLineNumber":165,"text":"- }","html":"- }","displayNoNewLineWarning":false,"position":15,"left":165,"right":162},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":163,"text":"+ curl_multi_remove_handle($multi-\u003ehandle, $ch);","html":"+ \u003cspan class=pl-en\u003ecurl_multi_remove_handle\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e);","displayNoNewLineWarning":false,"position":16,"left":165,"right":163},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":164,"text":" curl_setopt_array($ch, [","html":" \u003cspan class=pl-en\u003ecurl_setopt_array\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, [","displayNoNewLineWarning":false,"position":17,"left":166,"right":164},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":165,"text":" \\CURLOPT_NOPROGRESS =\u003e true,","html":" \\\u003cspan class=pl-c1\u003eCURLOPT_NOPROGRESS\u003c/span\u003e =\u0026gt; \u003cspan class=pl-c1\u003etrue\u003c/span\u003e,","displayNoNewLineWarning":false,"position":18,"left":167,"right":165},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":166,"text":" \\CURLOPT_PROGRESSFUNCTION =\u003e null,","html":" \\\u003cspan class=pl-c1\u003eCURLOPT_PROGRESSFUNCTION\u003c/span\u003e =\u0026gt; \u003cspan class=pl-c1\u003enull\u003c/span\u003e,","displayNoNewLineWarning":false,"position":19,"left":168,"right":166},{"stylingDirective":null,"type":"HUNK","blobLineNumber":241,"text":"@@ -244,7 +242,7 @@ public function __destruct()","html":"@@ -244,7 +242,7 @@ public function __destruct()","displayNoNewLineWarning":false,"position":20,"left":243,"right":241},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":242,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":244,"right":242},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":243,"text":" private static function schedule(self $response, array \u0026$runningResponses): void","html":" \u003cspan class=pl-k\u003eprivate\u003c/span\u003e \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003eschedule\u003c/span\u003e(\u003cspan class=pl-smi\u003e\u003cspan class=pl-smi\u003eself\u003c/span\u003e\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e, \u003cspan class=pl-smi\u003earray\u003c/span\u003e \u0026amp;\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003erunningResponses\u003c/span\u003e): \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":22,"left":245,"right":243},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":244,"text":" {","html":" {","displayNoNewLineWarning":false,"position":23,"left":246,"right":244},{"stylingDirective":null,"type":"DELETION","blobLineNumber":247,"text":"- if (isset($runningResponses[$i = (int) $response-\u003emulti-\u003ehandles[0]])) {","html":"- \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-en\"\u003eisset\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003erunningResponses\u003c/span\u003e[\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ei\u003c/span\u003e = (\u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e) \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eresponse\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first\"\u003ehandles\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e0\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e]\u003c/span\u003e])) {","displayNoNewLineWarning":false,"position":24,"left":247,"right":244},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":245,"text":"+ if (isset($runningResponses[$i = (int) $response-\u003emulti-\u003ehandle])) {","html":"+ \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-en\"\u003eisset\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003erunningResponses\u003c/span\u003e[\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003ei\u003c/span\u003e = (\u003cspan class=\"pl-smi\"\u003eint\u003c/span\u003e) \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eresponse\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1\"\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first x-last\"\u003ehandle\u003c/span\u003e])) {","displayNoNewLineWarning":false,"position":25,"left":247,"right":245},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":246,"text":" $runningResponses[$i][1][$response-\u003eid] = $response;","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003erunningResponses\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ei\u003c/span\u003e][\u003cspan class=pl-c1\u003e1\u003c/span\u003e][\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eid\u003c/span\u003e] = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e;","displayNoNewLineWarning":false,"position":26,"left":248,"right":246},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":247,"text":" } else {","html":" } \u003cspan class=pl-k\u003eelse\u003c/span\u003e {","displayNoNewLineWarning":false,"position":27,"left":249,"right":247},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":248,"text":" $runningResponses[$i] = [$response-\u003emulti, [$response-\u003eid =\u003e $response]];","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003erunningResponses\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ei\u003c/span\u003e] = [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003emulti\u003c/span\u003e, [\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003eid\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponse\u003c/span\u003e]];","displayNoNewLineWarning":false,"position":28,"left":250,"right":248},{"stylingDirective":null,"type":"HUNK","blobLineNumber":273,"text":"@@ -276,47 +274,39 @@ private static function perform(ClientState $multi, array \u0026$responses = null): v","html":"@@ -276,47 +274,39 @@ private static function perform(ClientState $multi, array \u0026amp;$responses = null): v","displayNoNewLineWarning":false,"position":29,"left":275,"right":273},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":274,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":30,"left":276,"right":274},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":275,"text":" try {","html":" \u003cspan class=pl-k\u003etry\u003c/span\u003e {","displayNoNewLineWarning":false,"position":31,"left":277,"right":275},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":276,"text":" self::$performing = true;","html":" \u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eperforming\u003c/span\u003e = \u003cspan class=pl-c1\u003etrue\u003c/span\u003e;","displayNoNewLineWarning":false,"position":32,"left":278,"right":276},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":277,"text":"+ $active = 0;","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eactive\u003c/span\u003e = \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":33,"left":278,"right":277},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":278,"text":"+ while (\\CURLM_CALL_MULTI_PERFORM === ($err = curl_multi_exec($multi-\u003ehandle, $active))) {","html":"+ \u003cspan class=pl-k\u003ewhile\u003c/span\u003e (\\\u003cspan class=pl-c1\u003eCURLM_CALL_MULTI_PERFORM\u003c/span\u003e === (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eerr\u003c/span\u003e = \u003cspan class=pl-en\u003ecurl_multi_exec\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eactive\u003c/span\u003e))) {","displayNoNewLineWarning":false,"position":34,"left":278,"right":278},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":279,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":35,"left":278,"right":279},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":280,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":36,"left":279,"right":280},{"stylingDirective":null,"type":"DELETION","blobLineNumber":280,"text":"- foreach ($multi-\u003ehandles as $i =\u003e $mh) {","html":"- \u003cspan class=pl-k\u003eforeach\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandles\u003c/span\u003e \u003cspan class=pl-k\u003eas\u003c/span\u003e \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ei\u003c/span\u003e =\u0026gt; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":37,"left":280,"right":280},{"stylingDirective":null,"type":"DELETION","blobLineNumber":281,"text":"- $active = 0;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eactive\u003c/span\u003e = \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":38,"left":281,"right":280},{"stylingDirective":null,"type":"DELETION","blobLineNumber":282,"text":"- while (\\CURLM_CALL_MULTI_PERFORM === ($err = curl_multi_exec($mh, $active))) {","html":"- \u003cspan class=pl-k\u003ewhile\u003c/span\u003e (\\\u003cspan class=pl-c1\u003eCURLM_CALL_MULTI_PERFORM\u003c/span\u003e === (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eerr\u003c/span\u003e = \u003cspan class=pl-en\u003ecurl_multi_exec\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eactive\u003c/span\u003e))) {","displayNoNewLineWarning":false,"position":39,"left":282,"right":280},{"stylingDirective":null,"type":"DELETION","blobLineNumber":283,"text":"- }","html":"- }","displayNoNewLineWarning":false,"position":40,"left":283,"right":280},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":281,"text":"+ if (\\CURLM_OK !== $err) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\\\u003cspan class=pl-c1\u003eCURLM_OK\u003c/span\u003e !== \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eerr\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":41,"left":283,"right":281},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":282,"text":"+ throw new TransportException(curl_multi_strerror($err));","html":"+ \u003cspan class=pl-k\u003ethrow\u003c/span\u003e \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eTransportException\u003c/span\u003e(\u003cspan class=pl-en\u003ecurl_multi_strerror\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eerr\u003c/span\u003e));","displayNoNewLineWarning":false,"position":42,"left":283,"right":282},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":283,"text":"+ }","html":"+ }","displayNoNewLineWarning":false,"position":43,"left":283,"right":283},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":284,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":44,"left":284,"right":284},{"stylingDirective":null,"type":"DELETION","blobLineNumber":285,"text":"- if (\\CURLM_OK !== $err) {","html":"- \u003cspan class=pl-k\u003eif\u003c/span\u003e (\\\u003cspan class=pl-c1\u003eCURLM_OK\u003c/span\u003e !== \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eerr\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":45,"left":285,"right":284},{"stylingDirective":null,"type":"DELETION","blobLineNumber":286,"text":"- throw new TransportException(curl_multi_strerror($err));","html":"- \u003cspan class=pl-k\u003ethrow\u003c/span\u003e \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eTransportException\u003c/span\u003e(\u003cspan class=pl-en\u003ecurl_multi_strerror\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eerr\u003c/span\u003e));","displayNoNewLineWarning":false,"position":46,"left":286,"right":284},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":285,"text":"+ while ($info = curl_multi_info_read($multi-\u003ehandle)) {","html":"+ \u003cspan class=pl-k\u003ewhile\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einfo\u003c/span\u003e = \u003cspan class=pl-en\u003ecurl_multi_info_read\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":47,"left":286,"right":285},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":286,"text":"+ if (\\CURLMSG_DONE !== $info['msg']) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\\\u003cspan class=pl-c1\u003eCURLMSG_DONE\u003c/span\u003e !== \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einfo\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003emsg\u003c/span\u003e\u0026#39;\u003c/span\u003e]) {","displayNoNewLineWarning":false,"position":48,"left":286,"right":286},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":287,"text":"+ continue;","html":"+ \u003cspan class=pl-k\u003econtinue\u003c/span\u003e;","displayNoNewLineWarning":false,"position":49,"left":286,"right":287},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":288,"text":" }","html":" }","displayNoNewLineWarning":false,"position":50,"left":287,"right":288},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":289,"text":"+ $result = $info['result'];","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einfo\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eresult\u003c/span\u003e\u0026#39;\u003c/span\u003e];","displayNoNewLineWarning":false,"position":51,"left":287,"right":289},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":290,"text":"+ $id = (int) $ch = $info['handle'];","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e = (\u003cspan class=pl-smi\u003eint\u003c/span\u003e) \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einfo\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ehandle\u003c/span\u003e\u0026#39;\u003c/span\u003e];","displayNoNewLineWarning":false,"position":52,"left":287,"right":290},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":291,"text":"+ $waitFor = @curl_getinfo($ch, \\CURLINFO_PRIVATE) ?: '_0';","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e = @\u003cspan class=pl-en\u003ecurl_getinfo\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLINFO_PRIVATE\u003c/span\u003e) ?: \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e_0\u003c/span\u003e\u0026#39;\u003c/span\u003e;","displayNoNewLineWarning":false,"position":53,"left":287,"right":291},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":292,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":54,"left":288,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":289,"text":"- while ($info = curl_multi_info_read($mh)) {","html":"- \u003cspan class=pl-k\u003ewhile\u003c/span\u003e (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einfo\u003c/span\u003e = \u003cspan class=pl-en\u003ecurl_multi_info_read\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":55,"left":289,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":290,"text":"- if (\\CURLMSG_DONE !== $info['msg']) {","html":"- \u003cspan class=pl-k\u003eif\u003c/span\u003e (\\\u003cspan class=pl-c1\u003eCURLMSG_DONE\u003c/span\u003e !== \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einfo\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003emsg\u003c/span\u003e\u0026#39;\u003c/span\u003e]) {","displayNoNewLineWarning":false,"position":56,"left":290,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":291,"text":"- continue;","html":"- \u003cspan class=pl-k\u003econtinue\u003c/span\u003e;","displayNoNewLineWarning":false,"position":57,"left":291,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":292,"text":"- }","html":"- }","displayNoNewLineWarning":false,"position":58,"left":292,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":293,"text":"- $result = $info['result'];","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einfo\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eresult\u003c/span\u003e\u0026#39;\u003c/span\u003e];","displayNoNewLineWarning":false,"position":59,"left":293,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":294,"text":"- $id = (int) $ch = $info['handle'];","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e = (\u003cspan class=pl-smi\u003eint\u003c/span\u003e) \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003einfo\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ehandle\u003c/span\u003e\u0026#39;\u003c/span\u003e];","displayNoNewLineWarning":false,"position":60,"left":294,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":295,"text":"- $waitFor = @curl_getinfo($ch, \\CURLINFO_PRIVATE) ?: '_0';","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e = @\u003cspan class=pl-en\u003ecurl_getinfo\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLINFO_PRIVATE\u003c/span\u003e) ?: \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e_0\u003c/span\u003e\u0026#39;\u003c/span\u003e;","displayNoNewLineWarning":false,"position":61,"left":295,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":296,"text":"-","html":"-","displayNoNewLineWarning":false,"position":62,"left":296,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":297,"text":"- if (\\in_array($result, [\\CURLE_SEND_ERROR, \\CURLE_RECV_ERROR, /*CURLE_HTTP2*/ 16, /*CURLE_HTTP2_STREAM*/ 92], true) \u0026\u0026 $waitFor[1] \u0026\u0026 'C' !== $waitFor[0]) {","html":"- \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003e\\in_array\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e, [\\\u003cspan class=pl-c1\u003eCURLE_SEND_ERROR\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLE_RECV_ERROR\u003c/span\u003e, \u003cspan class=pl-c\u003e/*CURLE_HTTP2*/\u003c/span\u003e \u003cspan class=pl-c1\u003e16\u003c/span\u003e, \u003cspan class=pl-c\u003e/*CURLE_HTTP2_STREAM*/\u003c/span\u003e \u003cspan class=pl-c1\u003e92\u003c/span\u003e], \u003cspan class=pl-c1\u003etrue\u003c/span\u003e) \u0026amp;\u0026amp; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e1\u003c/span\u003e] \u0026amp;\u0026amp; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eC\u003c/span\u003e\u0026#39;\u003c/span\u003e !== \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e0\u003c/span\u003e]) {","displayNoNewLineWarning":false,"position":63,"left":297,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":298,"text":"- curl_multi_remove_handle($mh, $ch);","html":"- \u003cspan class=pl-en\u003ecurl_multi_remove_handle\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e);","displayNoNewLineWarning":false,"position":64,"left":298,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":299,"text":"- $waitFor[1] = (string) ((int) $waitFor[1] - 1); // decrement the retry counter","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e1\u003c/span\u003e] = (\u003cspan class=pl-smi\u003estring\u003c/span\u003e) ((\u003cspan class=pl-smi\u003eint\u003c/span\u003e) \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e1\u003c/span\u003e] - \u003cspan class=pl-c1\u003e1\u003c/span\u003e); \u003cspan class=pl-c\u003e// decrement the retry counter\u003c/span\u003e","displayNoNewLineWarning":false,"position":65,"left":299,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":300,"text":"- curl_setopt($ch, \\CURLOPT_PRIVATE, $waitFor);","html":"- \u003cspan class=pl-en\u003ecurl_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLOPT_PRIVATE\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e);","displayNoNewLineWarning":false,"position":66,"left":300,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":301,"text":"- curl_setopt($ch, \\CURLOPT_FORBID_REUSE, true);","html":"- \u003cspan class=pl-en\u003ecurl_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLOPT_FORBID_REUSE\u003c/span\u003e, \u003cspan class=pl-c1\u003etrue\u003c/span\u003e);","displayNoNewLineWarning":false,"position":67,"left":301,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":302,"text":"-","html":"-","displayNoNewLineWarning":false,"position":68,"left":302,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":303,"text":"- if (0 === curl_multi_add_handle($mh, $ch)) {","html":"- \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-c1\u003e0\u003c/span\u003e === \u003cspan class=pl-en\u003ecurl_multi_add_handle\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":69,"left":303,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":304,"text":"- continue;","html":"- \u003cspan class=pl-k\u003econtinue\u003c/span\u003e;","displayNoNewLineWarning":false,"position":70,"left":304,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":305,"text":"- }","html":"- }","displayNoNewLineWarning":false,"position":71,"left":305,"right":292},{"stylingDirective":null,"type":"DELETION","blobLineNumber":306,"text":"- }","html":"- }","displayNoNewLineWarning":false,"position":72,"left":306,"right":292},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":293,"text":"+ if (\\in_array($result, [\\CURLE_SEND_ERROR, \\CURLE_RECV_ERROR, /*CURLE_HTTP2*/ 16, /*CURLE_HTTP2_STREAM*/ 92], true) \u0026\u0026 $waitFor[1] \u0026\u0026 'C' !== $waitFor[0]) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003e\\in_array\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e, [\\\u003cspan class=pl-c1\u003eCURLE_SEND_ERROR\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLE_RECV_ERROR\u003c/span\u003e, \u003cspan class=pl-c\u003e/*CURLE_HTTP2*/\u003c/span\u003e \u003cspan class=pl-c1\u003e16\u003c/span\u003e, \u003cspan class=pl-c\u003e/*CURLE_HTTP2_STREAM*/\u003c/span\u003e \u003cspan class=pl-c1\u003e92\u003c/span\u003e], \u003cspan class=pl-c1\u003etrue\u003c/span\u003e) \u0026amp;\u0026amp; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e1\u003c/span\u003e] \u0026amp;\u0026amp; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eC\u003c/span\u003e\u0026#39;\u003c/span\u003e !== \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e0\u003c/span\u003e]) {","displayNoNewLineWarning":false,"position":73,"left":306,"right":293},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":294,"text":"+ curl_multi_remove_handle($multi-\u003ehandle, $ch);","html":"+ \u003cspan class=pl-en\u003ecurl_multi_remove_handle\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandle\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e);","displayNoNewLineWarning":false,"position":74,"left":306,"right":294},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":295,"text":"+ $waitFor[1] = (string) ((int) $waitFor[1] - 1); // decrement the retry counter","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e1\u003c/span\u003e] = (\u003cspan class=pl-smi\u003estring\u003c/span\u003e) ((\u003cspan class=pl-smi\u003eint\u003c/span\u003e) \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e1\u003c/span\u003e] - \u003cspan class=pl-c1\u003e1\u003c/span\u003e); \u003cspan class=pl-c\u003e// decrement the retry counter\u003c/span\u003e","displayNoNewLineWarning":false,"position":75,"left":306,"right":295},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":296,"text":"+ curl_setopt($ch, \\CURLOPT_PRIVATE, $waitFor);","html":"+ \u003cspan class=pl-en\u003ecurl_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLOPT_PRIVATE\u003c/span\u003e, \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e);","displayNoNewLineWarning":false,"position":76,"left":306,"right":296},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":297 8000 ,"text":"+ curl_setopt($ch, \\CURLOPT_FORBID_REUSE, true);","html":"+ \u003cspan class=pl-en\u003ecurl_setopt\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLOPT_FORBID_REUSE\u003c/span\u003e, \u003cspan class=pl-c1\u003etrue\u003c/span\u003e);","displayNoNewLineWarning":false,"position":77,"left":306,"right":297},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":298,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":78,"left":307,"right":298},{"stylingDirective":null,"type":"DELETION","blobLineNumber":308,"text":"- if (\\CURLE_RECV_ERROR === $result \u0026\u0026 'H' === $waitFor[0] \u0026\u0026 400 \u003c= ($responses[(int) $ch]-\u003einfo['http_code'] ?? 0)) {","html":"- \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"x x-first\"\u003e\\\u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003eCURLE_RECV_ERROR\u003c/span\u003e === \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x x-first\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003eresult\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e \u0026amp;\u0026amp; \u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"x\"\u003e'\u003c/span\u003e\u003cspan class=\"pl-s x\"\u003eH\u003c/span\u003e\u003cspan class=\"x\"\u003e'\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e === \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003ewaitFor\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e0\u003c/span\u003e\u003cspan class=\"x\"\u003e] \u0026amp;\u0026amp; \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e400\u003c/span\u003e\u003cspan class=\"x\"\u003e \u0026lt;= (\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003eresponses\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e[(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003eint\u003c/span\u003e\u003cspan class=\"x\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003ech\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e]-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003einfo\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\u003cspan class=\"x\"\u003e'\u003c/span\u003e\u003cspan class=\"pl-s x\"\u003ehttp_code\u003c/span\u003e\u003cspan class=\"x\"\u003e'\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e] ?? \u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003e0\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":79,"left":308,"right":298},{"stylingDirective":null,"type":"DELETION","blobLineNumber":309,"text":"- $multi-\u003ehandlesActivity[$id][] = new FirstChunk();","html":"- \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x x-first\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003emulti\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003ehandlesActivity\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003eid\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e][] = \u003c/span\u003e\u003cspan class=\"pl-k x\"\u003enew\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-v x\"\u003eFirstChunk\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e()\u003c/span\u003e;","displayNoNewLineWarning":false,"position":80,"left":309,"right":298},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":299,"text":"+ if (0 === curl_multi_add_handle($multi-\u003ehandle, $ch)) {","html":"+ \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-c1 x x-first x-last\"\u003e0\u003c/span\u003e === \u003cspan class=\"pl-en x x-first\"\u003ecurl_multi_add_handle\u003c/span\u003e\u003cspan class=\"x\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003emulti\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003ehandle\u003c/span\u003e\u003cspan class=\"x\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-last\"\u003ech\u003c/span\u003e\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":81,"left":309,"right":299},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":300,"text":"+ continue;","html":"+ \u003cspan class=\"pl-k x x-first x-last\"\u003econtinue\u003c/span\u003e;","displayNoNewLineWarning":false,"position":82,"left":309,"right":300},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":301,"text":" }","html":" }","displayNoNewLineWarning":false,"position":83,"left":310,"right":301},{"stylingDirective":null,"type":"DELETION","blobLineNumber":311,"text":"-","html":"-","displayNoNewLineWarning":false,"position":84,"left":311,"right":301},{"stylingDirective":null,"type":"DELETION","blobLineNumber":312,"text":"- $multi-\u003ehandlesActivity[$id][] = null;","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandlesActivity\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e][] = \u003cspan class=pl-c1\u003enull\u003c/span\u003e;","displayNoNewLineWarning":false,"position":85,"left":312,"right":301},{"stylingDirective":null,"type":"DELETION","blobLineNumber":313,"text":"- $multi-\u003ehandlesActivity[$id][] = \\in_array($result, [\\CURLE_OK, \\CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \\CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \\CURLINFO_CONTENT_LENGTH_DOWNLOAD) ? null : new TransportException(sprintf('%s for \"%s\".', curl_strerror($result), curl_getinfo($ch, \\CURLINFO_EFFECTIVE_URL)));","html":"- \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandlesActivity\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e][] = \u003cspan class=pl-en\u003e\\in_array\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e, [\\\u003cspan class=pl-c1\u003eCURLE_OK\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLE_TOO_MANY_REDIRECTS\u003c/span\u003e], \u003cspan class=pl-c1\u003etrue\u003c/span\u003e) || \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e_0\u003c/span\u003e\u0026#39;\u003c/span\u003e === \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e || \u003cspan class=pl-en\u003ecurl_getinfo\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLINFO_SIZE_DOWNLOAD\u003c/span\u003e) === \u003cspan class=pl-en\u003ecurl_getinfo\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLINFO_CONTENT_LENGTH_DOWNLOAD\u003c/span\u003e) ? \u003cspan class=pl-c1\u003enull\u003c/span\u003e : \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eTransportException\u003c/span\u003e(\u003cspan class=pl-en\u003esprintf\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e%s for \u0026quot;%s\u0026quot;.\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-en\u003ecurl_strerror\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e), \u003cspan class=pl-en\u003ecurl_getinfo\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLINFO_EFFECTIVE_URL\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":86,"left":313,"right":301},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":302,"text":" }","html":" }","displayNoNewLineWarning":false,"position":87,"left":314,"right":302},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":303,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":88,"left":315,"right":303},{"stylingDirective":null,"type":"DELETION","blobLineNumber":316,"text":"- if (!$active \u0026\u0026 0 \u003c $i) {","html":"- \u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eactive\u003c/span\u003e \u0026amp;\u0026amp; \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u0026lt; \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ei\u003c/span\u003e) {","displayNoNewLineWarning":false,"position":89,"left":316,"right":303},{"stylingDirective":null,"type":"DELETION","blobLineNumber":317,"text":"- curl_multi_close($mh);","html":"- \u003cspan class=pl-en\u003ecurl_multi_close\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emh\u003c/span\u003e);","displayNoNewLineWarning":false,"position":90,"left":317,"right":303},{"stylingDirective":null,"type":"DELETION","blobLineNumber":318,"text":"- unset($multi-\u003ehandles[$i]);","html":"- unset(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandles\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ei\u003c/span\u003e]);","displayNoNewLineWarning":false,"position":91,"left":318,"right":303},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":304,"text":"+ if (\\CURLE_RECV_ERROR === $result \u0026\u0026 'H' === $waitFor[0] \u0026\u0026 400 \u003c= ($responses[(int) $ch]-\u003einfo['http_code'] ?? 0)) {","html":"+ \u003cspan class=pl-k\u003eif\u003c/span\u003e (\\\u003cspan class=pl-c1\u003eCURLE_RECV_ERROR\u003c/span\u003e === \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e \u0026amp;\u0026amp; \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003eH\u003c/span\u003e\u0026#39;\u003c/span\u003e === \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e[\u003cspan class=pl-c1\u003e0\u003c/span\u003e] \u0026amp;\u0026amp; \u003cspan class=pl-c1\u003e400\u003c/span\u003e \u0026lt;= (\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresponses\u003c/span\u003e[(\u003cspan class=pl-smi\u003eint\u003c/span\u003e) \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e]-\u0026gt;\u003cspan class=pl-c1\u003einfo\u003c/span\u003e[\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003ehttp_code\u003c/span\u003e\u0026#39;\u003c/span\u003e] ?? \u003cspan class=pl-c1\u003e0\u003c/span\u003e)) {","displayNoNewLineWarning":false,"position":92,"left":318,"right":304},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":305,"text":"+ $multi-\u003ehandlesActivity[$id][] = new FirstChunk();","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandlesActivity\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e][] = \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eFirstChunk\u003c/span\u003e();","displayNoNewLineWarning":false,"position":93,"left":318,"right":305},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":306,"text":" }","html":" }","displayNoNewLineWarning":false,"position":94,"left":319,"right":306},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":307,"text":"+","html":"+","displayNoNewLineWarning":false,"position":95,"left":319,"right":307},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":308,"text":"+ $multi-\u003ehandlesActivity[$id][] = null;","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandlesActivity\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e][] = \u003cspan class=pl-c1\u003enull\u003c/span\u003e;","displayNoNewLineWarning":false,"position":96,"left":319,"right":308},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":309,"text":"+ $multi-\u003ehandlesActivity[$id][] = \\in_array($result, [\\CURLE_OK, \\CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \\CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \\CURLINFO_CONTENT_LENGTH_DOWNLOAD) ? null : new TransportException(sprintf('%s for \"%s\".', curl_strerror($result), curl_getinfo($ch, \\CURLINFO_EFFECTIVE_URL)));","html":"+ \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=pl-c1\u003ehandlesActivity\u003c/span\u003e[\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eid\u003c/span\u003e][] = \u003cspan class=pl-en\u003e\\in_array\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e, [\\\u003cspan class=pl-c1\u003eCURLE_OK\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLE_TOO_MANY_REDIRECTS\u003c/span\u003e], \u003cspan class=pl-c1\u003etrue\u003c/span\u003e) || \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e_0\u003c/span\u003e\u0026#39;\u003c/span\u003e === \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ewaitFor\u003c/span\u003e || \u003cspan class=pl-en\u003ecurl_getinfo\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLINFO_SIZE_DOWNLOAD\u003c/span\u003e) === \u003cspan class=pl-en\u003ecurl_getinfo\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLINFO_CONTENT_LENGTH_DOWNLOAD\u003c/span\u003e) ? \u003cspan class=pl-c1\u003enull\u003c/span\u003e : \u003cspan class=pl-k\u003enew\u003c/span\u003e \u003cspan class=pl-v\u003eTransportException\u003c/span\u003e(\u003cspan class=pl-en\u003esprintf\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003e%s for \u0026quot;%s\u0026quot;.\u003c/span\u003e\u0026#39;\u003c/span\u003e, \u003cspan class=pl-en\u003ecurl_strerror\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eresult\u003c/span\u003e), \u003cspan class=pl-en\u003ecurl_getinfo\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ech\u003c/span\u003e, \\\u003cspan class=pl-c1\u003eCURLINFO_EFFECTIVE_URL\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":97,"left":319,"right":309},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":310,"text":" }","html":" }","displayNoNewLineWarning":false,"position":98,"left":320,"right":310},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":311,"text":" } finally {","html":" } \u003cspan class=pl-k\u003efinally\u003c/span\u003e {","displayNoNewLineWarning":false,"position":99,"left":321,"right":311},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":312,"text":" self::$performing = false;","html":" \u003cspan class=pl-smi\u003eself\u003c/span\u003e::\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eperforming\u003c/span\u003e = \u003cspan class=pl-c1\u003efalse\u003c/span\u003e;","displayNoNewLineWarning":false,"position":100,"left":322,"right":312},{"stylingDirective":null,"type":"HUNK","blobLineNumber":324,"text":"@@ -335,7 +325,7 @@ private static function select(ClientState $multi, float $timeout): int","html":"@@ -335,7 +325,7 @@ private static function select(ClientState $multi, float $timeout): int","displayNoNewLineWarning":false,"position":101,"left":334,"right":324},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":325,"text":" $timeout = min($timeout, 0.01);","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003etimeout\u003c/span\u003e = \u003cspan class=pl-en\u003emin\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003etimeout\u003c/span\u003e, \u003cspan class=pl-c1\u003e0.01\u003c/span\u003e);","displayNoNewLineWarning":false,"position":102,"left":335,"right":325},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":326,"text":" }","html":" }","displayNoNewLineWarning":false,"position":103,"left":336,"right":326},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":327,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":104,"left":337,"right":327},{"stylingDirective":null,"type":"DELETION","blobLineNumber":338,"text":"- return curl_multi_select($multi-\u003ehandles[array_key_last($multi-\u003ehandles)], $timeout);","html":"- \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ecurl_multi_select\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first\"\u003ehandles\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-en x\"\u003earray_key_last\u003c/span\u003e\u003cspan class=\"x\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1 x\"\u003e$\u003c/span\u003e\u003cspan class=\"x\"\u003emulti\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003ehandles\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e)]\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003etimeout\u003c/span\u003e);","displayNoNewLineWarning":false,"position":105,"left":338,"right":327},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":328,"text":"+ return curl_multi_select($multi-\u003ehandle, $timeout);","html":"+ \u003cspan class=\"pl-k\"\u003ereturn\u003c/span\u003e \u003cspan class=\"pl-en\"\u003ecurl_multi_select\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003emulti\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first x-last\"\u003ehandle\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003etimeout\u003c/span\u003e);","displayNoNewLineWarning":false,"position":106,"left":338,"right":328},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":329,"text":" }","html":" }","displayNoNewLineWarning":false,"position":107,"left":339,"right":329},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":330,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":108,"left":340,"right":330},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":331,"text":" /**","html":" \u003cspan class=pl-c\u003e/**\u003c/span\u003e","displayNoNewLineWarning":false,"position":109,"left":341,"right":331}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":421,"linesChanged":66,"newTreeEntry":{"lineCount":421,"path":"Response/CurlResponse.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Response/CurlResponse.php","mode":100644},"linesAdded":28,"linesDeleted":38,"path":"Response/CurlResponse.php","pathDigest":"6c0a6c001542268dbd7ebfd05533ed2482f597822a318b616a1256fb5a0e1d0b","status":"MODIFIED","truncatedReason":null,"oldOid":"c4e28fc333914313b9d5eb1be9709c36880a158d","newOid":"848a70d4f5321c006c1d9f6865aae93df4f49f50","copilotChatReference":null,"deletedSha":"c4e28fc333914313b9d5eb1be9709c36880a158d","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":142,"text":"@@ -143,9 +143,9 @@ public function testHandleIsReinitOnReset()","html":"@@ -143,9 +143,9 @@ public function testHandleIsReinitOnReset()","displayNoNewLineWarning":false,"position":0,"left":142,"right":142},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":143,"text":" $r = new \\ReflectionProperty($httpClient, 'multi');","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003er\u003c/span\u003e = \u003cspan class=pl-k\u003enew\u003c/span\u003e \\\u003cspan class=pl-v\u003eReflectionProperty\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ehttpClient\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026#39;\u003cspan class=pl-s\u003emulti\u003c/span\u003e\u0026#39;\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":143,"right":143},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":144,"text":" $r-\u003esetAccessible(true);","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003er\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003esetAccessible\u003c/span\u003e(\u003cspan class=pl-c1\u003etrue\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":144,"right":144},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":145,"text":" $clientState = $r-\u003egetValue($httpClient);","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003eclientState\u003c/span\u003e = \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003er\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003egetValue\u003c/span\u003e(\u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ehttpClient\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":145,"right":145},{"stylingDirective":null,"type":"DELETION","blobLineNumber":146,"text":"- $initialHandleId = (int) $clientState-\u003ehandles[0];","html":"- \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003einitialHandleId\u003c/span\u003e\u003c/span\u003e = \u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003eint\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eclientState\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first\"\u003ehandles\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e0\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e]\u003c/span\u003e;","displayNoNewLineWarning":false,"position":4,"left":146,"right":145},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":146,"text":"+ $initialShareId = $clientState-\u003eshare;","html":"+ \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first x-last\"\u003einitialShareId\u003c/span\u003e\u003c/span\u003e = \u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eclientState\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first x-last\"\u003eshare\u003c/span\u003e;","displayNoNewLineWarning":false,"position":5,"left":146,"right":146},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":147,"text":" $httpClient-\u003ereset();","html":" \u003cspan class=pl-s1\u003e\u003cspan class=pl-c1\u003e$\u003c/span\u003ehttpClient\u003c/span\u003e-\u0026gt;\u003cspan class=pl-en\u003ereset\u003c/span\u003e();","displayNoNewLineWarning":false,"position":6,"left":147,"right":147},{"stylingDirective":null,"type":"DELETION","blobLineNumber":148,"text":"- self::assertNotSame($initialHandleId, (int) $clientState-\u003ehandles[0]);","html":"- \u003cspan class=\"pl-smi\"\u003eself\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eassertNotSame\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first\"\u003einitialHandleId\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x\"\u003e, (\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003eint\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e) \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eclientState\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first\"\u003ehandles\u003c/span\u003e\u003cspan class=\"x\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e0\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e]\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":148,"right":147},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":148,"text":"+ self::assertNotSame($initialShareId, $clientState-\u003eshare);","html":"+ \u003cspan class=\"pl-smi\"\u003eself\u003c/span\u003e::\u003cspan class=\"pl-en\"\u003eassertNotSame\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003e\u003cspan class=\"x x-first\"\u003einitialShareId\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-c1\"\u003e$\u003c/span\u003eclientState\u003c/span\u003e-\u0026gt;\u003cspan class=\"pl-c1 x x-first x-last\"\u003eshare\u003c/span\u003e);","displayNoNewLineWarning":false,"position":8,"left":148,"right":148},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":149,"text":" }","html":" }","displayNoNewLineWarning":false,"position":9,"left":149,"right":149},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":150,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":10,"left":150,"right":150},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":151,"text":" public function testProcessAfterReset()","html":" \u003cspan class=pl-k\u003epublic\u003c/span\u003e \u003cspan class=pl-k\u003efunction\u003c/span\u003e \u003cspan class=pl-en\u003etestProcessAfterReset\u003c/span\u003e()","displayNoNewLineWarning":false,"position":11,"left":151,"right":151}],"diffNumber":3,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":220,"linesChanged":4,"newTreeEntry":{"lineCount":220,"path":"Tests/CurlHttpClientTest.php","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"Tests/CurlHttpClientTest.php","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"Tests/CurlHttpClientTest.php","pathDigest":"479eb3f5dc9ec9584f1b7c85a1e307c7fca1943c714e8c4c5ea18f450adcf184","status":"MODIFIED","truncatedReason":null,"oldOid":"c4e28fc333914313b9d5eb1be9709c36880a158d","newOid":"848a70d4f5321c006c1d9f6865aae93df4f49f50","copilotChatReference":null,"deletedSha":"c4e28fc333914313b9d5eb1be9709c36880a158d","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null}],"splitViewPreference":"unified","ignoreWhitespace":false,"commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/symfony/http-client/commit/848a70d4f5321c006c1d9f6865aae93df4f49f50","fileTreeExpanded":true,"headerInfo":{"additions":52,"deletions":73,"filesChanged":4,"filesChangedString":"4"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":4,"truncated":false,"byteCount":12622,"lineShownCount":247},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"OBI2sg-MUhHsSWb8n0OlZeUrCqHeIcQ8ir42hiumlr1SWC1FfZxKAHTIW5bxe--MYKe3HIVEmusPrhjim8_OSg"},"/users/diffview?diff=unified":{"post":"EL21yb5CYA2E2ZH_IxjfurV6t8ZyetB7Kn25z7u4Qzt6964-zFJ4HBxYrJVNIJVTMPYKeykfjqyvbZerC9EbzA"},"/notifications/thread":{"post":"0I6rCEQcACQKsbcQQsSR_1LA7XwLd8iX1to9W-SuF1Afk5--3unWa0rXRTJAMhdbWX_hmmGlB9URloP6RnTfYQ"}}},"title":"[HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset() · symfony/http-client@848a70d","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-6dcb06aa9fad.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false}}}

Commit 848a70d

Browse files
[HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset()
1 parent c4e28fc commit 848a70d

File tree

4 files changed

+52
-73
lines changed

4 files changed

+52
-73
lines changed

CurlHttpClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ public function request(string $method, string $url, array $options = []): Respo
168168

169169
if ($resolve && 0x072A00 > CurlClientState::$curlVersion['version_number']) {
170170
// DNS cache removals require curl 7.42 or higher
171-
// On lower versions, we have to create a new multi handle
172171
$this->multi->reset();
173172
}
174173

@@ -280,6 +279,7 @@ public function request(string $method, string $url, array $options = []): Respo
280279
if (!$pushedResponse) {
281280
$ch = curl_init();
282281
$this->logger && $this->logger->info(sprintf('Request: "%s %s"', $method, $url));
282+
$curlopts += [\CURLOPT_SHARE => $this->multi->share];
283283
}
284284

285285
foreach ($curlopts as $opt => $value) {
@@ -306,9 +306,9 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa
306306
throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of CurlResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses)));
307307
}
308308

309-
if (\is_resource($mh = $this->multi->handles[0] ?? null) || $mh instanceof \CurlMultiHandle) {
309+
if (\is_resource($this->multi->handle) || $this->multi->handle instanceof \CurlMultiHandle) {
310310
$active = 0;
311-
while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($mh, $active)) {
311+
while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($this->multi->handle, $active)) {
312312
}
313313
}
314314

Internal/CurlClientState.php

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
*/
2424
final class CurlClientState extends ClientState
2525
{
26-
/** @var array<\CurlMultiHandle|resource> */
27-
public $handles = [];
26+
/** @var \CurlMultiHandle|resource */
27+
public $handle;
28+
/** @var \CurlShareHandle|resource */
29+
public $share;
2830
/** @var PushedResponse[] */
2931
public $pushedResponses = [];
3032
/** @var DnsCache */
@@ -34,27 +36,23 @@ final class CurlClientState extends ClientState
3436

3537
public static $curlVersion;
3638

37-
private $maxHostConnections;
38-
private $maxPendingPushes;
39-
4039
public function __construct(int $maxHostConnections, int $maxPendingPushes)
4140
{
4241
self::$curlVersion = self::$curlVersion ?? curl_version();
4342

44-
array_unshift($this->handles, $mh = curl_multi_init());
43+
$this->handle = curl_multi_init();
4544
$this->dnsCache = new DnsCache();
46-
$this->maxHostConnections = $maxHostConnections;
47-
$this->maxPendingPushes = $maxPendingPushes;
45+
$this->reset();
4846

4947
// Don't enable HTTP/1.1 pipelining: it forces responses to be sent in order
5048
if (\defined('CURLPIPE_MULTIPLEX')) {
51-
curl_multi_setopt($mh, \CURLMOPT_PIPELINING, \CURLPIPE_MULTIPLEX);
49+
curl_multi_setopt($this->handle, \CURLMOPT_PIPELINING, \CURLPIPE_MULTIPLEX);
5250
}
5351
if (\defined('CURLMOPT_MAX_HOST_CONNECTIONS')) {
54-
$maxHostConnections = curl_multi_setopt($mh, \CURLMOPT_MAX_HOST_CONNECTIONS, 0 < $maxHostConnections ? $maxHostConnections : \PHP_INT_MAX) ? 0 : $maxHostConnections;
52+
$maxHostConnections = curl_multi_setopt($this->handle, \CURLMOPT_MAX_HOST_CONNECTIONS, 0 < $maxHostConnections ? $maxHostConnections : \PHP_INT_MAX) ? 0 : $maxHostConnections;
5553
}
5654
if (\defined('CURLMOPT_MAXCONNECTS') && 0 < $maxHostConnections) {
57-
curl_multi_setopt($mh, \CURLMOPT_MAXCONNECTS, $maxHostConnections);
55+
curl_multi_setopt($this->handle, \CURLMOPT_MAXCONNECTS, $maxHostConnections);
5856
}
5957

6058
// Skip configuring HTTP/2 push when it's unsupported or buggy, see https://bugs.php.net/77535
@@ -67,40 +65,31 @@ public function __construct(int $maxHostConnections, int $maxPendingPushes)
6765
return;
6866
}
6967

70-
// Clone to prevent a circular reference
71-
$multi = clone $this;
72-
$multi->handles = [$mh];
73-
$multi->pushedResponses = &$this->pushedResponses;
74-
$multi->logger = &$this->logger;
75-
$multi->handlesActivity = &$this->handlesActivity;
76-
$multi->openHandles = &$this->openHandles;
77-
$multi->lastTimeout = &$this->lastTimeout;
78-
79-
curl_multi_setopt($mh, \CURLMOPT_PUSHFUNCTION, static function ($parent, $pushed, array $requestHeaders) use ($multi, $maxPendingPushes) {
80-
return $multi->handlePush($parent, $pushed, $requestHeaders, $maxPendingPushes);
68+
curl_multi_setopt($this->handle, \CURLMOPT_PUSHFUNCTION, function ($parent, $pushed, array $requestHeaders) use ($maxPendingPushes) {
69+
return $this->handlePush($parent, $pushed, $requestHeaders, $maxPendingPushes);
8170
});
8271
}
8372

8473
public function reset()
8574
{
8675
foreach ($this->pushedResponses as $url => $response) {
8776
$this->logger && $this->logger->debug(sprintf('Unused pushed response: "%s"', $url));
88-
89-
foreach ($this->handles as $mh) {
90-
curl_multi_remove_handle($mh, $response->handle);
91-
}
77+
curl_multi_remove_handle($this->handle, $response->handle);
9278
curl_close($response->handle);
9379
}
9480

9581
$this->pushedResponses = [];
9682
$this->dnsCache->evictions = $this->dnsCache->evictions ?: $this->dnsCache->removals;
9783
$this->dnsCache->removals = $this->dnsCache->hostnames = [];
9884

99-
if (\defined('CURLMOPT_PUSHFUNCTION')) {
100-
curl_multi_setopt($this->handles[0], \CURLMOPT_PUSHFUNCTION, null);
101-
}
85+
$this->share = curl_share_init();
86+
87+
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_DNS);
88+
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_SSL_SESSION);
10289

103-
$this->__construct($this->maxHostConnections, $this->maxPendingPushes);
90+
if (\defined('CURL_LOCK_DATA_CONNECT')) {
91+
curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_CONNECT);
92+
}
10493
}
10594

10695
private function handlePush($parent, $pushed, array $requestHeaders, int $maxPendingPushes): int

Response/CurlResponse.php

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function __construct(CurlClientState $multi, $ch, array $options = null,
150150
// Schedule the request in a non-blocking way
151151
$multi->lastTimeout = null;
152152
$multi->openHandles[$id] = [$ch, $options];
153-
curl_multi_add_handle($multi->handles[0], $ch);
153+
curl_multi_add_handle($multi->handle, $ch);
154154

155155
$this->canary = new Canary(static function () use ($ch, $multi, $id) {
156156
unset($multi->openHandles[$id], $multi->handlesActivity[$id]);
@@ -160,9 +160,7 @@ public function __construct(CurlClientState $multi, $ch, array $options = null,
160160
return;
161161
}
162162

163-
foreach ($multi->handles as $mh) {
164-
curl_multi_remove_handle($mh, $ch);
165-
}
163+
curl_multi_remove_handle($multi->handle, $ch);
166164
curl_setopt_array($ch, [
167165
\CURLOPT_NOPROGRESS => true,
168166
\CURLOPT_PROGRESSFUNCTION => null,
@@ -244,7 +242,7 @@ public function __destruct()
244242
*/
245243
private static function schedule(self $response, array &$runningResponses): void
246244
{
247-
if (isset($runningResponses[$i = (int) $response->multi->handles[0]])) {
245+
if (isset($runningResponses[$i = (int) $response->multi->handle])) {
248246
$runningResponses[$i][1][$response->id] = $response;
249247
} else {
250248
$runningResponses[$i] = [$response->multi, [$response->id => $response]];
@@ -276,47 +274,39 @@ private static function perform(ClientState $multi, array &$responses = null): v
276274

277275
try {
278276
self::$performing = true;
277+
$active = 0;
278+
while (\CURLM_CALL_MULTI_PERFORM === ($err = curl_multi_exec($multi->handle, $active))) {
279+
}
279280

280-
foreach ($multi->handles as $i => $mh) {
281-
$active = 0;
282-
while (\CURLM_CALL_MULTI_PERFORM === ($err = curl_multi_exec($mh, $active))) {
283-
}
281+
if (\CURLM_OK !== $err) {
282+
throw new TransportException(curl_multi_strerror($err));
283+
}
284284

285-
if (\CURLM_OK !== $err) {
286-
throw new TransportException(curl_multi_strerror($err));
285+
while ($info = curl_multi_info_read($multi->handle)) {
286+
if (\CURLMSG_DONE !== $info['msg']) {
287+
continue;
287288
}
289+
$result = $info['result'];
290+
$id = (int) $ch = $info['handle'];
291+
$waitFor = @curl_getinfo($ch, \CURLINFO_PRIVATE) ?: '_0';
288292

289-
while ($info = curl_multi_info_read($mh)) {
290-
if (\CURLMSG_DONE !== $info['msg']) {
291-
continue;
292-
}
293-
$result = $info['result'];
294-
$id = (int) $ch = $info['handle'];
295-
$waitFor = @curl_getinfo($ch, \CURLINFO_PRIVATE) ?: '_0';
296-
297-
if (\in_array($result, [\CURLE_SEND_ERROR, \CURLE_RECV_ERROR, /*CURLE_HTTP2*/ 16, /*CURLE_HTTP2_STREAM*/ 92], true) && $waitFor[1] && 'C' !== $waitFor[0]) {
298-
curl_multi_remove_handle($mh, $ch);
299-
$waitFor[1] = (string) ((int) $waitFor[1] - 1); // decrement the retry counter
300-
curl_setopt($ch, \CURLOPT_PRIVATE, $waitFor);
301-
curl_setopt($ch, \CURLOPT_FORBID_REUSE, true);
302-
303-
if (0 === curl_multi_add_handle($mh, $ch)) {
304-
continue;
305-
}
306-
}
293+
if (\in_array($result, [\CURLE_SEND_ERROR, \CURLE_RECV_ERROR, /*CURLE_HTTP2*/ 16, /*CURLE_HTTP2_STREAM*/ 92], true) && $waitFor[1] && 'C' !== $waitFor[0]) {
294+
curl_multi_remove_handle($multi->handle, $ch);
295+
$waitFor[1] = (string) ((int) $waitFor[1] - 1); // decrement the retry counter
296+
curl_setopt($ch, \CURLOPT_PRIVATE, $waitFor);
297+
curl_setopt($ch, \CURLOPT_FORBID_REUSE, true);
307298

308-
if (\CURLE_RECV_ERROR === $result && 'H' === $waitFor[0] && 400 <= ($responses[(int) $ch]->info['http_code'] ?? 0)) {
309-
$multi->handlesActivity[$id][] = new FirstChunk();
299+
if (0 === curl_multi_add_handle($multi->handle, $ch)) {
300+
continue;
310301
}
311-
312-
$multi->handlesActivity[$id][] = null;
313-
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinf 1241 o($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) ? null : new TransportException(sprintf('%s for "%s".', curl_strerror($result), curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
314302
}
315303

316-
if (!$active && 0 < $i) {
317-
curl_multi_close($mh);
318-
unset($multi->handles[$i]);
304+
if (\CURLE_RECV_ERROR === $result && 'H' === $waitFor[0] && 400 <= ($responses[(int) $ch]->info['http_code'] ?? 0)) {
305+
$multi->handlesActivity[$id][] = new FirstChunk();
319306
}
307+
308+
$multi->handlesActivity[$id][] = null;
309+
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) ? null : new TransportException(sprintf('%s for "%s".', curl_strerror($result), curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
320310
}
321311
} finally {
322312
self::$performing = false;
@@ -335,7 +325,7 @@ private static function select(ClientState $multi, float $timeout): int
335325
$timeout = min($timeout, 0.01);
336326
}
337327

338-
return curl_multi_select($multi->handles[array_key_last($multi->handles)], $timeout);
328+
return curl_multi_select($multi->handle, $timeout);
339329
}
340330

341331
/**

Tests/CurlHttpClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ public function testHandleIsReinitOnReset()
143143
$r = new \ReflectionProperty($httpClient, 'multi');
144144
$r->setAccessible(true);
145145
$clientState = $r->getValue($httpClient);
146-
$initialHandleId = (int) $clientState->handles[0];
146+
$initialShareId = $clientState->share;
147147
$httpClient->reset();
148-
self::assertNotSame($initialHandleId, (int) $clientState->handles[0]);
148+
self::assertNotSame($initialShareId, $clientState->share);
149149
}
150150

151151
public function testProcessAfterReset()

0 commit comments

Comments
 (0)
0