diff --git a/index/scorch/merge.go b/index/scorch/merge.go index cc3af774..35469d59 100644 --- a/index/scorch/merge.go +++ b/index/scorch/merge.go @@ -162,7 +162,11 @@ func (s *Scorch) planMergeAtSnapshot(ourSnapshot *IndexSnapshot) error { } } for _, notification := range notifications { - <-notification + select { + case <-s.closeCh: + return nil + case <-notification: + } } return nil }