diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-11 15:19:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-11 15:19:13 +0300 |
commit | 39c4905723dab98b383e7dc5940caa7f8080c2cc (patch) | |
tree | 92bc25246971b64d65aea0fbaffda41629bec284 /lib/gitlab/buffered_io.rb | |
parent | 02f78c1ee8be411f4455c6679cfd87f3a0b2721b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/buffered_io.rb')
-rw-r--r-- | lib/gitlab/buffered_io.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/buffered_io.rb b/lib/gitlab/buffered_io.rb index a2f1cf42b04..91d5d8acc52 100644 --- a/lib/gitlab/buffered_io.rb +++ b/lib/gitlab/buffered_io.rb @@ -23,11 +23,10 @@ module Gitlab override :readuntil def readuntil(terminator, ignore_eof = false) start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC) - check_timeout = Feature.enabled?(:header_read_timeout_buffered_io) begin until idx = @rbuf.index(terminator) - if check_timeout && (elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time) > HEADER_READ_TIMEOUT + if (elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time) > HEADER_READ_TIMEOUT raise Gitlab::HTTP::HeaderReadTimeout, "Request timed out after reading headers for #{elapsed} seconds" end |