1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #860 from LK4D4/fix_ctrlr_race

Fix race in setting ctrlr for network
This commit is contained in:
Jana Radhakrishnan 2016-01-12 11:09:02 -08:00
commit ad14618fc0

View file

@ -129,7 +129,9 @@ func (c *controller) getNetworksFromStore() ([]*network, error) {
for _, kvo := range kvol {
n := kvo.(*network)
n.Lock()
n.ctrlr = c
n.Unlock()
ec := &endpointCnt{n: n}
err = store.GetObject(datastore.Key(ec.Key()...), ec)