Skip to content

Commit

Permalink
Dont flush and close
Browse files Browse the repository at this point in the history
Signed-off-by: thatInfrastructureGuy <[email protected]>
  • Loading branch information
thatInfrastructureGuy committed Jan 19, 2021
1 parent 622385b commit f77fba6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ func (c *Converter) csvToGzip(toGzip chan *csvBuf, w io.Writer, wg *sync.WaitGro
return
}

err = zw.Flush()
if err != nil {
c.quit <- fmt.Errorf("Error flushing contents to gzip writer: ", err)
return
}

if csvBuf.lastPart {
err = zw.Close()
if err != nil {
c.quit <- fmt.Errorf("Error flushing contents to gzip writer: ", err)
return
}
} else {
err = zw.Flush()
if err != nil {
c.quit <- fmt.Errorf("Error flushing contents to gzip writer: ", err)
return
}
}

// Upload partially created file to S3
Expand Down

0 comments on commit f77fba6

Please sign in to comment.