Skip to content

Commit

Permalink
Revert "opt: make it fail when binding to the same AF_UNIX path"
Browse files Browse the repository at this point in the history
This reverts commit 4609d50.
  • Loading branch information
panjf2000 committed Apr 24, 2024
1 parent 4609d50 commit 4c3b84f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions listener_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c3b84f

Please sign in to comment.