mirror of
https://github.com/Cyclenerd/offline-map-tile-downloader.git
synced 2026-06-01 20:34:55 +02:00
Fix: ineffective break statement
This commit is contained in:
@@ -361,10 +361,11 @@ func downloadTiles(ctx context.Context, conn *websocket.Conn, tilesToDownload []
|
|||||||
ticker := time.NewTicker(time.Second / time.Duration(*rateLimit))
|
ticker := time.NewTicker(time.Second / time.Duration(*rateLimit))
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
|
DownloadLoop:
|
||||||
for _, tile := range tilesToDownload {
|
for _, tile := range tilesToDownload {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
break
|
break DownloadLoop
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
tileChan <- tile
|
tileChan <- tile
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user