Merge pull request #3359 from keloyang/close-socket-fd
Close the inherited socket fd
This commit is contained in:
commit
b95f0a6cea
@ -196,7 +196,9 @@ func serve(ctx context.Context, server *ttrpc.Server, path string) error {
|
|||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if path == "" {
|
if path == "" {
|
||||||
l, err = net.FileListener(os.NewFile(3, "socket"))
|
f := os.NewFile(3, "socket")
|
||||||
|
l, err = net.FileListener(f)
|
||||||
|
f.Close()
|
||||||
path = "[inherited from parent]"
|
path = "[inherited from parent]"
|
||||||
} else {
|
} else {
|
||||||
if len(path) > 106 {
|
if len(path) > 106 {
|
||||||
|
Loading…
Reference in New Issue
Block a user