summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-05 21:55:33 +0900
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-05 21:55:33 +0900
commitf7f63765d1ea5e5ce6bc6757d5ad335dcdb4f2a1 (patch)
tree9b2cf72407c60551c7393219ba1bf7a20f428fff
parent3e8f2e3fa58b5825cfb3a2dbcf4591a882ecf92b (diff)
conn: close ipv4 socket when ipv6 socket fails
-rw-r--r--conn_default.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/conn_default.go b/conn_default.go
index 549483c..6f17de5 100644
--- a/conn_default.go
+++ b/conn_default.go
@@ -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