@@ -0,0 +1,24 @@
12+// isStaleSocketErr reports whether err indicates a Unix-domain socket file
13+// exists on disk but no process is listening on it (a stale or orphaned
14+// socket). It returns false for nil and for timeout errors.
15+func isStaleSocketErr(err error) bool {
20+ if errors.As(err, &netErr) && netErr.Timeout() {
23+ return errors.Is(err, syscall.ECONNREFUSED) || errors.Is(err, fs.ErrNotExist)