network: fix a typo in udp cleanup path
Fix #3224 - Port already in use error when running a container Signed-off-by: Tzu-Jung Lee <roylee17@gmail.com> Upstream-commit: 7d2e851d8e921bf8f07f54c8afb8262580b36e8d Component: engine
This commit is contained in:
@ -628,7 +628,7 @@ func (iface *NetworkInterface) Release() {
|
||||
log.Printf("Unable to release port %s", nat)
|
||||
}
|
||||
} else if nat.Port.Proto() == "udp" {
|
||||
if err := iface.manager.tcpPortAllocator.Release(ip, hostPort); err != nil {
|
||||
if err := iface.manager.udpPortAllocator.Release(ip, hostPort); err != nil {
|
||||
log.Printf("Unable to release port %s: %s", nat, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user