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()){
111
111
}while ($ running > 0 );
112
112
113
113
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 ();
119
120
120
- $ results [] = $ queries [$ i ]->response ;
121
+ $ results [] = $ queries [$ i ]->response ;
121
122
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
+ }
123
129
}
124
130
125
131
if ($ nActions === 1 ){
@@ -354,7 +360,7 @@ final public function processCH(){
354
360
355
361
$ headerSize = curl_getinfo ($ this ->ch , CURLINFO_HEADER_SIZE );
356
362
357
- if ($ response === false ){
363
+ if ($ response === false || $ response === '' ){
358
364
++$ this ->nErrors ;
359
365
360
366
if ($ this ->nErrors <= $ this ->settings ['maxErrorRetryAttempts ' ]){
You can’t perform that action at this time.
0 commit comments