Skip to content

Commit

Permalink
Fix an endless loop when getrandom is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
tbu- committed Sep 1, 2018
1 parent d6d280b commit b95c491
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/sys/unix/rand.rs
Expand Up @@ -61,6 +61,7 @@ mod imp {
continue;
} else if err == libc::ENOSYS {
GETRANDOM_UNAVAILABLE.store(true, Ordering::Relaxed);
return false;
} else if err == libc::EAGAIN {
return false;
} else {
Expand Down

0 comments on commit b95c491

Please sign in to comment.