Closed
Description
Symfony version(s) affected: 5.1.0-RC1
Description
AmpHttpClient's request method sets these timeout values:
$request->setTcpConnectTimeout(1000 * $options['timeout']);
$request->setTlsHandshakeTimeout(1000 * $options['timeout']);
$request->setTransferTimeout(1000 * $options['max_duration']);
However, the amphp/http-client module introduced a fourth timeout in version 4.3.0 released on May 3rd, an inactivity timeout, as seen here: amphp/http-client#263
How to reproduce
Make a request and sleep for 11 seconds before calling getContent().
Possible Solution
Adding $request->setInactivityTimeout(1000 * $options['max_duration']);
works, but I'm not sure that is the appropriate $options value to use (timeout would make sense, as would a non-existent new option).
Another temporary option could be to restrict the package to version 4.2.2 when Symfony 5.1 is released?