Fix sync cmd with single CPU core

This commit is contained in:
Anis Elleuch
2015-05-27 18:51:39 +01:00
parent 0674ce8085
commit a00091ffee
+1 -1
View File
@@ -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) {