lib/model: Refactor folderRunners to use a serviceMap (#9071)
Instead of separately tracking the token.
Also changes serviceMap to have a channel version of RemoveAndWait, so
that it's possible to do the removal under a lock but wait outside of
the lock. And changed where we do that in connection close, reversing
the change that happened when I added the serviceMap in 40b3b9ad1.
This commit is contained in:
@@ -377,7 +377,8 @@ func TestIssue4841(t *testing.T) {
|
||||
}
|
||||
|
||||
// Setup file from remote that was ignored locally
|
||||
folder := m.folderRunners[defaultFolderConfig.ID].(*sendReceiveFolder)
|
||||
runner, _ := m.folderRunners.Get(defaultFolderConfig.ID)
|
||||
folder := runner.(*sendReceiveFolder)
|
||||
folder.updateLocals([]protocol.FileInfo{{
|
||||
Name: "foo",
|
||||
Type: protocol.FileInfoTypeFile,
|
||||
|
||||
Reference in New Issue
Block a user