mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2024-11-26 09:13:10 +01:00
conn: close ipv4 socket when ipv6 socket fails
This commit is contained in:
parent
3e8f2e3fa5
commit
f7f63765d1
@ -111,7 +111,6 @@ func CreateBind(uport uint16, device *Device) (Bind, uint16, error) {
|
||||
|
||||
bind.ipv6, port, err = listenNet("udp6", port)
|
||||
if err != nil && extractErrno(err) != syscall.EAFNOSUPPORT {
|
||||
return nil, 0, err
|
||||
bind.ipv4.Close()
|
||||
bind.ipv4 = nil
|
||||
return nil, 0, err
|
||||
|
Loading…
Reference in New Issue
Block a user