Skip to content

Commit

Permalink
opt: make it fail when binding to the same AF_UNIX path
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Apr 24, 2024
1 parent 31a153f commit 4609d50
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion listener_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ 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 4609d50

Please sign in to comment.