lib/model: Actually break puller loop on context cancel (#7492)

Current break does nothing (breaks the select).
This commit is contained in:
Jakob Borg 2021-03-17 21:34:52 +01:00 committed by GitHub
parent 6d93d9c488
commit 81484699db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1496,11 +1496,12 @@ func (f *sendReceiveFolder) pullBlock(state pullBlockState, snap *db.Snapshot, o
var lastError error
candidates := f.model.availabilityInSnapshot(f.FolderConfiguration, snap, state.file, state.block)
loop:
for {
select {
case <-f.ctx.Done():
state.fail(errors.Wrap(f.ctx.Err(), "folder stopped"))
break
break loop
default:
}