diff options
-rw-r--r-- | src/prng/os-prng.lisp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/prng/os-prng.lisp b/src/prng/os-prng.lisp index 1f245ab..fb36bbb 100644 --- a/src/prng/os-prng.lisp +++ b/src/prng/os-prng.lisp @@ -15,7 +15,7 @@ #+unix (let* ((seq (make-array num-bytes :element-type '(unsigned-byte 8))) (n (bt:with-lock-held (*os-prng-stream-lock*) - (unless *os-prng-stream* + (unless (and *os-prng-stream* (open-stream-p *os-prng-stream*)) (setf *os-prng-stream* (open #P"/dev/urandom" #+ccl :sharing #+ccl :external :element-type '(unsigned-byte 8)))) |