swarm/storage: Move defer lock unlock before db close

This commit is contained in:
lash 2017-11-10 16:41:53 +01:00
parent fb4f106ef7
commit e833eb86eb

View file

@ -119,8 +119,8 @@ func (self *DPA) Start() {
func (self *DPA) Stop() {
self.lock.Lock()
self.Close()
defer self.lock.Unlock()
self.Close()
if !self.running {
return
}