diff options
author | Nick White <git@njw.name> | 2021-05-19 22:27:37 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2021-05-19 22:27:37 +0100 |
commit | 2ac2807916fbf36e1fce5726ac102ab66f14d4ad (patch) | |
tree | 4e1aba8cc0238a02271d805fdac683efa8c55e3f | |
parent | d96a4c93e1745a7a648f8fdddae2e2199c06dfca (diff) |
Close process channel after writing to err channel in download(), in case of an error
This is needed so that in tests the error can be selected out reliably,
rather than an empty process signal.
-rw-r--r-- | internal/pipeline/pipeline.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/pipeline/pipeline.go b/internal/pipeline/pipeline.go index 5ba0cb4..72d7fd1 100644 --- a/internal/pipeline/pipeline.go +++ b/internal/pipeline/pipeline.go @@ -87,8 +87,8 @@ func download(dl chan string, process chan string, conn Pipeliner, dir string, e if err != nil { for range dl { } // consume the rest of the receiving channel so it isn't blocked - close(process) errc <- err + close(process) return } process <- fn |