mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-04-17 22:46:54 +02:00
conn: close ipv4 socket when ipv6 socket fails
This commit is contained in:
parent
3e8f2e3fa5
commit
f7f63765d1
1 changed files with 0 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue