func()

in plugin/plugin.go [90:101]


func (m *PluginManager) cleanSockFile() error {
	// @ implies the use of Linux socket namespace - no file on disk and nothing to clean-up.
	if strings.HasPrefix(m.unixSocketFilePath, "@") {
		return nil
	}

	err := os.Remove(m.unixSocketFilePath)
	if err != nil && !os.IsNotExist(err) {
		return fmt.Errorf("failed to delete the socket file, error: %w", err)
	}
	return nil
}