Skip to content

Commit

Permalink
Merge pull request #32 from cisco-pxgrid/kmadhura_main_large_api_mult…
Browse files Browse the repository at this point in the history
…ipart_4

Fixes: kmadhura CSCwe27654
  • Loading branch information
kamalrajmadhurakasan authored Aug 7, 2023
2 parents e90acce + 300eab7 commit ee2b36a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ func (d *Device) Query(request *http.Request) (*http.Response, error) {
var uploadErr error
for i := 0; ; i++ {
b, err := io.ReadAll(io.LimitReader(reader, int64(PartSize)))
if err != nil {
//Process bytes if err is EOF and return err only for other type of errors.
if err != nil && err != io.EOF {
return nil, err
}
if len(b) == 0 {
Expand Down

0 comments on commit ee2b36a

Please sign in to comment.