Skip to content

Commit b95c491

Browse files
committed
Fix an endless loop when getrandom is not available
1 parent d6d280b commit b95c491

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libstd/sys/unix/rand.rs

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ mod imp {
6161
continue;
6262
} else if err == libc::ENOSYS {
6363
GETRANDOM_UNAVAILABLE.store(true, Ordering::Relaxed);
64+
return false;
6465
} else if err == libc::EAGAIN {
6566
return false;
6667
} else {

0 commit comments

Comments
 (0)