From 4c3b84f54b33f34015a41838b14a9e52b9cb5959 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Thu, 25 Apr 2024 00:23:04 +0800 Subject: [PATCH] Revert "opt: make it fail when binding to the same AF_UNIX path" This reverts commit 4609d5075d0ea9f164b396aba65003220425c334. --- listener_unix.go | 1 + 1 file changed, 1 insertion(+) diff --git a/listener_unix.go b/listener_unix.go index 956c84890..18fde857a 100644 --- a/listener_unix.go +++ b/listener_unix.go @@ -58,6 +58,7 @@ func (ln *listener) normalize() (err error) { ln.fd, ln.addr, err = socket.UDPSocket(ln.network, ln.address, false, ln.sockOpts...) ln.network = "udp" case "unix": + _ = os.RemoveAll(ln.address) ln.fd, ln.addr, err = socket.UnixSocket(ln.network, ln.address, true, ln.sockOpts...) default: err = errors.ErrUnsupportedProtocol