mirror of
https://github.com/golang/go.git
synced 2025-11-09 21:21:03 +00:00
net: do not unlink unix socket in UnixListener created from fd
Fixes #11826. Change-Id: Id220dd558ca8d8d78c01975087122d27757deea0 Reviewed-on: https://go-review.googlesource.com/17458 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
f939ee13ae
commit
a4fd325c17
2 changed files with 6 additions and 5 deletions
|
|
@ -91,7 +91,7 @@ func fileListener(f *os.File) (Listener, error) {
|
|||
case *TCPAddr:
|
||||
return &TCPListener{fd}, nil
|
||||
case *UnixAddr:
|
||||
return &UnixListener{fd, laddr.Name}, nil
|
||||
return &UnixListener{fd: fd, path: laddr.Name, unlink: false}, nil
|
||||
}
|
||||
fd.Close()
|
||||
return nil, syscall.EINVAL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue