From f7f63765d1ea5e5ce6bc6757d5ad335dcdb4f2a1 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 5 Feb 2019 21:55:33 +0900 Subject: [PATCH] conn: close ipv4 socket when ipv6 socket fails --- conn_default.go | 1 - 1 file changed, 1 deletion(-) 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