From a00091ffee7597610caee9c570095cf3ce1e7d6e Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Wed, 27 May 2015 18:51:39 +0100 Subject: [PATCH] Fix sync cmd with single CPU core --- cmd-sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {