Commit e1ce353
committed
bug symfony#59727 [HttpClient] Fix activity tracking leading to negative timeout errors (nicolas-grekas)
This PR was merged into the 6.4 branch.
Discussion
----------
[HttpClient] Fix activity tracking leading to negative timeout errors
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#59041
| License | MIT
The error case leading to the linked issue is very hard to spot. I won't be able to provide a reproducer nor am I 100% sure that this will fix it. This patch comes solely from logical reasoning so I might have missed something, but hopefully this closes any possibility of passing a negative timeout to `self::select()`.
The fix should be provided by the changed lines about `$hasActivity` and `$lastActivity`.
The rest is cleaning / hardening found meanwhile.
Commits
-------
ee3451b [HttpClient] Fix activity tracking leading to negative timeout errorsFile tree
5 files changed
+33
-31
lines changed- src/Symfony/Component/HttpClient/Response
5 files changed
+33
-31
lines changedLines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
194 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
Lines changed: 20 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
| |||
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
165 | | - | |
166 | | - | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
| 188 | + | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 193 | + | |
| 194 | + | |
193 | 195 | | |
| 196 | + | |
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
| |||
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
230 | | - | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| |||
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
| 279 | + | |
277 | 280 | | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
| 284 | + | |
281 | 285 | | |
282 | 286 | | |
283 | 287 | | |
| |||
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
294 | | - | |
| 298 | + | |
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
| |||
0 commit comments