File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -111,15 +111,21 @@ final public function api($action, $options = array()){
111111 }while ($ running > 0 );
112112
113113 for ($ i = 0 ; $ i < $ nActions ; ++$ i ){
114- $ queries [$ i ]
115- ->processCH ()
116- ->checkForAndHandleError ()
117- ->actionResponse ()
118- ->finalize ();
114+ try {
115+ $ queries [$ i ]
116+ ->processCH ()
117+ ->checkForAndHandleError ()
118+ ->actionResponse ()
119+ ->finalize ();
119120
120- $ results [] = $ queries [$ i ]->response ;
121+ $ results [] = $ queries [$ i ]->response ;
121122
122- curl_multi_remove_handle ($ this ->mch , $ this ->chs [$ i ]);
123+ curl_multi_remove_handle ($ this ->mch , $ this ->chs [$ i ]);
124+ }catch (\Exception $ err ){
125+ curl_multi_remove_handle ($ this ->mch , $ this ->chs [$ i ]);
126+
127+ throw $ err ;
128+ }
123129 }
124130
125131 if ($ nActions === 1 ){
@@ -354,7 +360,7 @@ final public function processCH(){
354360
355361 $ headerSize = curl_getinfo ($ this ->ch , CURLINFO_HEADER_SIZE );
356362
357- if ($ response === false ){
363+ if ($ response === false || $ response === '' ){
358364 ++$ this ->nErrors ;
359365
360366 if ($ this ->nErrors <= $ this ->settings ['maxErrorRetryAttempts ' ]){
You can’t perform that action at this time.
0 commit comments