Fix #3224 - Port already in use error when running a container
Signed-off-by: Tzu-Jung Lee <roylee17@gmail.com>
| ... | ... |
@@ -628,7 +628,7 @@ func (iface *NetworkInterface) Release() {
|
| 628 | 628 |
log.Printf("Unable to release port %s", nat)
|
| 629 | 629 |
} |
| 630 | 630 |
} else if nat.Port.Proto() == "udp" {
|
| 631 |
- if err := iface.manager.tcpPortAllocator.Release(ip, hostPort); err != nil {
|
|
| 631 |
+ if err := iface.manager.udpPortAllocator.Release(ip, hostPort); err != nil {
|
|
| 632 | 632 |
log.Printf("Unable to release port %s: %s", nat, err)
|
| 633 | 633 |
} |
| 634 | 634 |
} |