File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,14 @@ public function sendAsyncRequest(RequestInterface $request)
86
86
87
87
$ onFulfilled = function (ResponseInterface $ response ) use ($ event , $ stack ) {
88
88
$ this ->collectResponseInformations ($ response , $ event , $ stack );
89
+ $ event ->stop ();
89
90
90
91
return $ response ;
91
92
};
92
93
93
94
$ onRejected = function (\Exception $ exception ) use ($ event , $ stack ) {
94
95
$ this ->collectExceptionInformations ($ exception , $ event , $ stack );
96
+ $ event ->stop ();
95
97
96
98
throw $ exception ;
97
99
};
@@ -100,8 +102,11 @@ public function sendAsyncRequest(RequestInterface $request)
100
102
101
103
try {
102
104
return $ this ->client ->sendAsyncRequest ($ request )->then ($ onFulfilled , $ onRejected );
103
- } finally {
105
+ } catch ( \ Exception $ e ) {
104
106
$ event ->stop ();
107
+
108
+ throw $ e ;
109
+ } finally {
105
110
if ($ activateStack ) {
106
111
//We only activate the stack when created by the StackPlugin.
107
112
$ this ->collector ->activateStack ($ stack );
You can’t perform that action at this time.
0 commit comments