Fix race in setting ctrlr for network
Race is with network.getController() method. Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
06ff0a98a0
commit
3569adad28
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue