Skip to content

Commit

Permalink
avoid goroutine leak when creating bigtiff cogs (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort authored Nov 15, 2021
1 parent 957b8b3 commit d402fa3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cog.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ func (cog *cog) computeImageryOffsets() error {
} else {
if dataOffset > uint64(^uint32(0)) { //^uint32(0) is max uint32
//rerun with bigtiff support

//first empty out the tiles channel to avoid a goroutine leak
for range tiles {
//skip
}
cog.bigtiff = true
return cog.computeImageryOffsets()
}
Expand Down

0 comments on commit d402fa3

Please sign in to comment.