diff --git a/lib/model/folder_sendrecv.go b/lib/model/folder_sendrecv.go index 693b455ac..4050f06ff 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -163,6 +163,7 @@ func (f *sendReceiveFolder) pull() (bool, error) { scanChan := make(chan string) go f.pullScannerRoutine(scanChan) + defer close(scanChan) metricFolderPulls.WithLabelValues(f.ID).Inc() ctx, cancel := context.WithCancel(f.ctx)