This commit is contained in:
crusader 2017-10-26 23:54:25 +09:00
parent e7526836ae
commit f64464cc85

View File

@ -8,9 +8,7 @@ import (
func (sh *ServerHandlers) Listen() (net.Listener, error) { func (sh *ServerHandlers) Listen() (net.Listener, error) {
sh.path = filepath.Join(os.TempDir(), sh.Addr) sh.path = filepath.Join(os.TempDir(), sh.Addr)
if err := os.Remove(sh.path); nil != err { os.Remove(sh.path); nil != err {
return nil, err
}
return net.ListenUnix("unix", &net.UnixAddr{Name: sh.path, Net: "unix"}) return net.ListenUnix("unix", &net.UnixAddr{Name: sh.path, Net: "unix"})
} }