//go:build !windows package rpcfetch import ( "errors" "io/fs" "net" "syscall" "time" ) var errPipe = syscall.EPIPE func (d *Client) dial() error { if d.dialed { panic("attempted to dial on open client") } if conn, err := net.DialTimeout("unix", sockPath()+"/discord-ipc-0", 5*time.Second); err != nil { if errors.Is(err, fs.ErrNotExist) { return ErrAgain } return err } else { d.conn = conn d.dialed = true } return nil }