random: Properly handle errors when reading from /dev/[u]random
[strongswan.git] / src / libstrongswan / plugins / random / random_rng.c
index 36d5446..177b3c2 100644 (file)
@@ -56,6 +56,7 @@ METHOD(rng_t, get_bytes, bool,
                        DBG1(DBG_LIB, "reading from random FD %d failed: %s, retrying...",
                                 this->fd, strerror(errno));
                        sleep(1);
+                       continue;
                }
                done += got;
        }