We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 37fe36b + 2d3fdd6 commit 1c6149dCopy full SHA for 1c6149d
src/util.rs
@@ -34,10 +34,10 @@ where
34
for _ in 0..num_retries {
35
let path = base.join(tmpname(prefix, suffix, random_len));
36
return match f(path) {
37
- Err(ref e) if e.kind() == io::ErrorKind::AlreadyExists => continue,
+ Err(ref e) if e.kind() == io::ErrorKind::AlreadyExists && num_retries > 1 => continue,
38
// AddrInUse can happen if we're creating a UNIX domain socket and
39
// the path already exists.
40
- Err(ref e) if e.kind() == io::ErrorKind::AddrInUse => continue,
+ Err(ref e) if e.kind() == io::ErrorKind::AddrInUse && num_retries > 1 => continue,
41
res => res,
42
};
43
}
0 commit comments