summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/indexer/code/indexer.go2
-rw-r--r--modules/indexer/issues/indexer.go2
-rw-r--r--services/repository/archiver/archiver.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/indexer/code/indexer.go b/modules/indexer/code/indexer.go
index 3ead3261e9..f15b8d8651 100644
--- a/modules/indexer/code/indexer.go
+++ b/modules/indexer/code/indexer.go
@@ -133,7 +133,7 @@ func Init() {
finished()
})
- waitChannel := make(chan time.Duration)
+ waitChannel := make(chan time.Duration, 1)
// Create the Queue
switch setting.Indexer.RepoType {
diff --git a/modules/indexer/issues/indexer.go b/modules/indexer/issues/indexer.go
index 8ca9975c7b..d4df4f8a4f 100644
--- a/modules/indexer/issues/indexer.go
+++ b/modules/indexer/issues/indexer.go
@@ -104,7 +104,7 @@ var (
func InitIssueIndexer(syncReindex bool) {
ctx, _, finished := process.GetManager().AddTypedContext(context.Background(), "Service: IssueIndexer", process.SystemProcessType, false)
- waitChannel := make(chan time.Duration)
+ waitChannel := make(chan time.Duration, 1)
// Create the Queue
switch setting.Indexer.IssueType {
diff --git a/services/repository/archiver/archiver.go b/services/repository/archiver/archiver.go
index 7c2cf237d5..ebd3eaf236 100644
--- a/services/repository/archiver/archiver.go
+++ b/services/repository/archiver/archiver.go
@@ -172,7 +172,7 @@ func doArchive(r *ArchiveRequest) (*repo_model.RepoArchiver, error) {
w.Close()
rd.Close()
}()
- done := make(chan error)
+ done := make(chan error, 1) // Ensure that there is some capacity which will ensure that the goroutine below can always finish
repo, err := repo_model.GetRepositoryByID(archiver.RepoID)
if err != nil {
return nil, fmt.Errorf("archiver.LoadRepo failed: %v", err)