We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1efdbd7 + 6c84577 commit 160efcbCopy full SHA for 160efcb
pkg/internal/testing/addr/manager.go
@@ -71,10 +71,20 @@ func (c *portCache) add(port int) (bool, error) {
71
}
72
info, err := d.Info()
73
if err != nil {
74
+ // No-op if file no longer exists; may have been deleted by another
75
+ // process/thread trying to allocate ports.
76
+ if errors.Is(err, fs.ErrNotExist) {
77
+ return nil
78
+ }
79
return err
80
81
if time.Since(info.ModTime()) > portReserveTime {
82
if err := os.Remove(filepath.Join(cacheDir, path)); err != nil {
83
84
85
+ if os.IsNotExist(err) {
86
87
88
89
90
0 commit comments