diff --git a/cmd-sync.go b/cmd-sync.go index 0ba3f09f..6f75647f 100644 --- a/cmd-sync.go +++ b/cmd-sync.go @@ -71,7 +71,7 @@ func runSyncCmd(ctx *cli.Context) { } }(sourceURL, targetURLs) - var syncQueue = make(chan bool, runtime.NumCPU()-1) + var syncQueue = make(chan bool, intMax(runtime.NumCPU()-1, 1)) var wg sync.WaitGroup for syncURLs := range prepareSyncURLs(sourceURL, targetURLs) {