Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/http.rb')
-rw-r--r--lib/gitlab/http.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/http.rb b/lib/gitlab/http.rb
index 1b860001ac0..d0918fc39bc 100644
--- a/lib/gitlab/http.rb
+++ b/lib/gitlab/http.rb
@@ -49,11 +49,12 @@ module Gitlab
return httparty_perform_request(http_method, path, options_with_timeouts, &block)
end
- start_time = Gitlab::Metrics::System.monotonic_time
+ start_time = nil
read_total_timeout = options.fetch(:timeout, DEFAULT_READ_TOTAL_TIMEOUT)
tracked_timeout_error = false
httparty_perform_request(http_method, path, options_with_timeouts) do |fragment|
+ start_time ||= Gitlab::Metrics::System.monotonic_time
elapsed = Gitlab::Metrics::System.monotonic_time - start_time
if elapsed > read_total_timeout