Commit 4ea09e6c authored by mikeytown2's avatar mikeytown2

Issue #1874764 by mikeytown2: auto adjust time to first byte timeout if...

Issue #1874764 by mikeytown2: auto adjust time to first byte timeout if timeout is larger than default.
parent 9696035f
......@@ -322,6 +322,11 @@ function httprl_set_default_options(&$options) {
'async_connect' => TRUE,
);
// Adjust Time To First Byte Timeout if timeout is large and ttfb is default.
if ($options['timeout'] > httprl_variable_get('httprl_timeout', HTTPRL_TIMEOUT) && $options['ttfb_timeout'] == httprl_variable_get('httprl_ttfb_timeout', HTTPRL_TTFB_TIMEOUT)) {
$options['ttfb_timeout'] = $options['timeout'] - max(1, httprl_variable_get('httprl_timeout', HTTPRL_TIMEOUT) - httprl_variable_get('httprl_ttfb_timeout', HTTPRL_TTFB_TIMEOUT));
}
// Merge the default headers.
// Set user agent to drupal.
// Set connection to closed to prevent keep-alive from causing a timeout.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment