diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-12 09:11:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-12 09:11:00 +0300 |
commit | 563d0d3bc956f6d6a9805720dade3b72bd488043 (patch) | |
tree | 1e246cd120ba4ee6b03028ad9d257579f7ca8493 /lib/gitlab/http.rb | |
parent | 415a70d59c85bb52dee8338e0c69d50fd1d38454 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/http.rb')
-rw-r--r-- | lib/gitlab/http.rb | 3 |
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 |