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

This commit is contained in:
Jakob Borg 2023-08-08 07:24:02 +02:00 committed by GitHub
parent e09146ee03
commit 8b87cd5229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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)