Browse Source

lib/model: Reinstate setting folder idle state (#9029)

Jakob Borg 2 years ago
parent
commit
8b87cd5229
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lib/model/folder_sendrecv.go

+ 4 - 1
lib/model/folder_sendrecv.go

@@ -163,7 +163,10 @@ func (f *sendReceiveFolder) pull() (bool, error) {
 
 	scanChan := make(chan string)
 	go f.pullScannerRoutine(scanChan)
-	defer close(scanChan)
+	defer func() {
+		close(scanChan)
+		f.setState(FolderIdle)
+	}()
 
 	metricFolderPulls.WithLabelValues(f.ID).Inc()
 	ctx, cancel := context.WithCancel(f.ctx)