1
0
mirror of https://github.com/docker/cli.git synced 2026-01-23 15:21:32 +03:00

Merge pull request #30719 from alfred-landrum/gdcounter

Fix RefCounter count return
Upstream-commit: 70dc4cd44654612c28bb8f6fa596d1f0dc9be14e
Component: engine
This commit is contained in:
Alexander Morozov
2017-02-03 11:09:17 -08:00
committed by GitHub

View File

@@ -40,8 +40,9 @@ func (c *RefCounter) Increment(path string) int {
}
}
m.count++
count := m.count
c.mu.Unlock()
return m.count
return count
}
// Decrement decreases the ref count for the given id and returns the current count
@@ -62,6 +63,7 @@ func (c *RefCounter) Decrement(path string) int {
}
}
m.count--
count := m.count
c.mu.Unlock()
return m.count
return count
}