From 5f33e9a8f238457916349c982939104e94504aa0 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Wed, 18 Apr 2018 17:58:01 +0300 Subject: [PATCH] swarm/fuse: lock around minfo (#393) --- swarm/fuse/swarmfs_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/swarm/fuse/swarmfs_test.go b/swarm/fuse/swarmfs_test.go index af5c7964fb..42d14436c7 100644 --- a/swarm/fuse/swarmfs_test.go +++ b/swarm/fuse/swarmfs_test.go @@ -100,6 +100,7 @@ func mountDir(t *testing.T, api *api.Api, files map[string]fileInfo, bzzHash str found := false mi := swarmfs.Listmounts() for _, minfo := range mi { + minfo.lock.RLock() if minfo.MountPoint == mountDir { if minfo.StartManifest != bzzHash || minfo.LatestManifest != bzzHash || @@ -108,6 +109,7 @@ func mountDir(t *testing.T, api *api.Api, files map[string]fileInfo, bzzHash str } found = true } + minfo.lock.RUnlock() } // Test listMounts