summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-05-15 22:34:29 +0900
committerShinya Maeda <shinya@gitlab.com>2018-05-21 19:35:46 +0900
commit93349b4440add0da70f87026ae434be5c10f1ad1 (patch)
tree99b0a57cf19643a64b435db50f99a366930a0035 /lib/api
parentad9e00917fdff0c311f4755e8be764016ddd18e1 (diff)
downloadgitlab-ce-93349b4440add0da70f87026ae434be5c10f1ad1.tar.gz
Append trace only if the job is running
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/runner.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb
index 649feba1036..a4df98cadac 100644
--- a/lib/api/runner.rb
+++ b/lib/api/runner.rb
@@ -165,7 +165,7 @@ module API
body_start = content_range[0].to_i
body_end = body_start + body_data.bytesize
- stream_size = job.trace.append(body_data, body_start)
+ stream_size = job.trace.append(body_data, body_start) if job.running?
unless stream_size == body_end
break error!('416 Range Not Satisfiable', 416, { 'Range' => "0-#{stream_size}" })
end