Skip to content

Commit

Permalink
Merge pull request containerd#961 from dmcgowan/remote-read-logic-error
Browse files Browse the repository at this point in the history
service/content: fix logic error on storing extra data
  • Loading branch information
stevvooe authored Jun 6, 2017
2 parents 3e0c50c + 73763b9 commit 25cc761
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions services/content/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ func (rr *remoteReader) Read(p []byte) (n int, err error) {
n += copied
p = p[copied:]

if copied < len(p) {
continue
if len(p) == 0 {
rr.extra = append(rr.extra, resp.Data[copied:]...)
}

rr.extra = append(rr.extra, resp.Data[copied:]...)
}

return
Expand Down

0 comments on commit 25cc761

Please sign in to comment.