Skip to content

Commit

Permalink
client: use a bytes.Reader for reading a []byte
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed May 2, 2018
1 parent aad596b commit 8776cf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command/agent/fs_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func (s *HTTPServer) fsStreamImpl(resp http.ResponseWriter,
}
}

if _, err := io.Copy(output, bytes.NewBuffer(res.Payload)); err != nil {
if _, err := io.Copy(output, bytes.NewReader(res.Payload)); err != nil {
errCh <- CodedError(500, err.Error())
return
}
Expand Down

0 comments on commit 8776cf8

Please sign in to comment.