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

Merge pull request #807 from LK4D4/fix_copy_mu

Fix mutex copy
This commit is contained in:
Madhu Venugopal 2015-12-09 04:35:57 -08:00
commit db8f663df0
2 changed files with 3 additions and 3 deletions

View file

@ -51,7 +51,7 @@ func Init(dc driverapi.DriverCallback, config map[string]interface{}) error {
d := &driver{
networks: networkTable{},
peerDb: peerNetworkMap{
mp: map[string]peerMap{},
mp: map[string]*peerMap{},
},
config: config,
}

View file

@ -26,7 +26,7 @@ type peerMap struct {
}
type peerNetworkMap struct {
mp map[string]peerMap
mp map[string]*peerMap
sync.Mutex
}
@ -138,7 +138,7 @@ func (d *driver) peerDbAdd(nid, eid string, peerIP net.IP, peerIPMask net.IPMask
d.peerDb.Lock()
pMap, ok := d.peerDb.mp[nid]
if !ok {
d.peerDb.mp[nid] = peerMap{
d.peerDb.mp[nid] = &peerMap{
mp: make(map[string]peerEntry),
}