diff --git a/cog.go b/cog.go index 746c96c..8a2fcbe 100644 --- a/cog.go +++ b/cog.go @@ -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() }