diff --git a/src/components/input.lisp b/src/components/input.lisp index 7d5f207..fed0e14 100644 --- a/src/components/input.lisp +++ b/src/components/input.lisp @@ -75,11 +75,9 @@ (sb-sys:with-pinned-objects (buf) (let ((sap (sb-sys:vector-sap buf))) (if timeout-ms - ;; Poll first: only read if data is ready - (if (sb-unix:unix-simple-poll fd :input timeout-ms) - (let ((n (sb-unix:unix-read fd sap 1))) - (if (= n 1) (aref buf 0) (values nil :eof))) - nil) + (progn (sb-unix:unix-simple-poll fd :input timeout-ms) + (let ((n (sb-unix:unix-read fd sap 1))) + (if (= n 1) (aref buf 0) (values nil :eof)))) (let ((n (sb-unix:unix-read fd sap 1))) (if (= n 1) (aref buf 0) (values nil :eof))))))))