mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-08-27 11:16:55 +00:00
Merge pull request #472 from cloudflare/remap-lock
lock port mapper when reapplying iptables rules
This commit is contained in:
@@ -188,6 +188,8 @@ func (pm *PortMapper) Unmap(host net.Addr) error {
|
||||
|
||||
//ReMapAll will re-apply all port mappings
|
||||
func (pm *PortMapper) ReMapAll() {
|
||||
pm.lock.Lock()
|
||||
defer pm.lock.Unlock()
|
||||
logrus.Debugln("Re-applying all port mappings.")
|
||||
for _, data := range pm.currentMappings {
|
||||
containerIP, containerPort := getIPAndPort(data.container)
|
||||
|
||||
Reference in New Issue
Block a user