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:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-23 18:46:33 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-26 15:15:46 +0300
commitc150772edb65f727c9be0a82ec71c4b084c9d949 (patch)
treeabef5c3b6eedd400075dd322b096638041328e1f /lib/gitlab/http_io.rb
parent2e3dab38295b7c36ab100f20c654fdfaf9b00885 (diff)
Fix deadlock on ChunkedIO
Diffstat (limited to 'lib/gitlab/http_io.rb')
-rw-r--r--lib/gitlab/http_io.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/http_io.rb b/lib/gitlab/http_io.rb
index e768b8adb12..6a9fb85b054 100644
--- a/lib/gitlab/http_io.rb
+++ b/lib/gitlab/http_io.rb
@@ -85,11 +85,11 @@ module Gitlab
break if data.empty?
chunk_bytes = [BUFFER_SIZE - chunk_offset, length].min
- chunk_data = data.byteslice(0, chunk_bytes)
+ data_slice = data.byteslice(0, chunk_bytes)
- out << chunk_data
- @tell += chunk_data.bytesize
- length -= chunk_data.bytesize
+ out << data_slice
+ @tell += data_slice.bytesize
+ length -= data_slice.bytesize
end
out = out.join