mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
lib/model: Actually break puller loop on context cancel (#7492)
Current break does nothing (breaks the select).
This commit is contained in:
parent
6d93d9c488
commit
81484699db
@ -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:
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user