diff --git a/serialio/aio/posix.py b/serialio/aio/posix.py index 3af9a81..e5caae1 100644 --- a/serialio/aio/posix.py +++ b/serialio/aio/posix.py @@ -269,7 +269,8 @@ async def close(self): # - - - - - - - - - - - - - - - - - - - - - - - - @property - def in_waiting(self): + @ensure_open + async def in_waiting(self): """Return the number of bytes currently in the input buffer.""" # ~ s = fcntl.ioctl(self.fd, termios.FIONREAD, TIOCM_zero_str) s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)