Cleanup socket file
This commit is contained in:
@@ -57,7 +57,7 @@ func (l *UAPIListener) Close() error {
|
||||
}
|
||||
|
||||
func (l *UAPIListener) Addr() net.Addr {
|
||||
return nil
|
||||
return l.listener.Addr()
|
||||
}
|
||||
|
||||
func UAPIListen(name string, file *os.File) (net.Listener, error) {
|
||||
@@ -75,6 +75,10 @@ func UAPIListen(name string, file *os.File) (net.Listener, error) {
|
||||
connErr: make(chan error, 1),
|
||||
}
|
||||
|
||||
if unixListener, ok := listener.(*net.UnixListener); ok {
|
||||
unixListener.SetUnlinkOnClose(true)
|
||||
}
|
||||
|
||||
socketPath := path.Join(
|
||||
socketDirectory,
|
||||
fmt.Sprintf(socketName, name),
|
||||
|
||||
Reference in New Issue
Block a user