@@ 32-38 (lines=7) @@ | ||
29 | { |
|
30 | $deferred = new Deferred; |
|
31 | $errno = curl_multi_add_handle($this->mh, $ch); |
|
32 | if ($errno !== CURLM_OK) { |
|
33 | // @codeCoverageIgnoreStart |
|
34 | $msg = curl_multi_strerror($errno) . ": $ch"; |
|
35 | $deferred->reject(new \RuntimeException($msg)); |
|
36 | return $deferred->promise(); |
|
37 | // @codeCoverageIgnoreEnd |
|
38 | } |
|
39 | $this->added[(string)$ch] = $ch; |
|
40 | $this->deferreds[(string)$ch] = $deferred; |
|
41 | return $deferred->promise(); |
@@ 60-66 (lines=7) @@ | ||
57 | private function addImmediate($ch, Deferred $deferred = null) |
|
58 | { |
|
59 | $errno = curl_multi_add_handle($this->mh, $ch); |
|
60 | if ($errno !== CURLM_OK) { |
|
61 | // @codeCoverageIgnoreStart |
|
62 | $msg = curl_multi_strerror($errno) . ": $ch"; |
|
63 | $deferred && $deferred->reject(new \RuntimeException($msg)); |
|
64 | return; |
|
65 | // @codeCoverageIgnoreEnd |
|
66 | } |
|
67 | $this->added[(string)$ch] = $ch; |
|
68 | $deferred && $this->deferreds[(string)$ch] = $deferred; |
|
69 | } |