File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,14 @@ immediately instead of waiting to receive the response::
116
116
This component also supports :ref: `streaming responses <http-client-streaming-responses >`
117
117
for full asynchronous applications.
118
118
119
+ .. caution ::
120
+
121
+ Reference to ``$response `` object must be kept in order to benefit from the asynchronous
122
+ behavior. If no reference is kept the response object is destroyed by PHP
123
+ garbage collector which force the response to be resolved at this moment.
124
+ One solution is to store all ``$response `` object in an ``array `` to keep a reference to them
125
+ until they are not needed anymore.
126
+
119
127
.. note ::
120
128
121
129
HTTP compression and chunked transfer encoding are automatically enabled when
You can’t perform that action at this time.
0 commit comments