MCPcopy Create free account
hub / github.com/PasarGuard/node / removeUnixSocketFiles

Function removeUnixSocketFiles

backend/xray/core.go:160–178  ·  view source on GitHub ↗
(paths []string)

Source from the content-addressed store, hash-verified

158}
159
160func removeUnixSocketFiles(paths []string) {
161 for _, path := range paths {
162 info, err := os.Lstat(path)
163 if err != nil {
164 if !os.IsNotExist(err) {
165 log.Printf("warning: failed to stat unix socket %s: %v", path, err)
166 }
167 continue
168 }
169
170 if info.Mode()&os.ModeSocket == 0 {
171 continue
172 }
173
174 if err := os.Remove(path); err != nil && !os.IsNotExist(err) {
175 log.Printf("warning: failed to remove unix socket %s: %v", path, err)
176 }
177 }
178}
179
180func (c *Core) Start(xConfig *Config, debugMode bool) error {
181 accessFile, errorFile := xConfig.GetLogFiles()

Callers 3

StartMethod · 0.85
StopMethod · 0.85

Calls

no outgoing calls