This commit is contained in:
crusader 2017-10-27 11:01:53 +09:00
parent 3c60fe4276
commit 6762d7f872

View File

@ -2,17 +2,15 @@ package ipc
import (
"net"
"os"
"path/filepath"
)
func (sh *ServerHandlers) Listen() (net.Listener, error) {
sh.path = filepath.Join(os.TempDir(), sh.Addr)
os.Remove(sh.path)
//sh.path = filepath.Join(os.TempDir(), sh.Addr)
// os.Remove(sh.path)
return net.ListenUnix("unix", &net.UnixAddr{Name: sh.path, Net: "unix"})
return net.ListenUnix("unix", &net.UnixAddr{Name: sh.Addr, Net: "unix"})
}
func (sh *ServerHandlers) Stopped() {
os.Remove(sh.path)
// os.Remove(sh.path)
}