diff --git a/scrapli/transport/plugins/asyncssh/transport.py b/scrapli/transport/plugins/asyncssh/transport.py index 7a295e33..85c619fe 100644 --- a/scrapli/transport/plugins/asyncssh/transport.py +++ b/scrapli/transport/plugins/asyncssh/transport.py @@ -259,6 +259,9 @@ async def read(self) -> bytes: if not self.stdout: raise ScrapliConnectionNotOpened + if self.stdout.at_eof(): + raise ScrapliConnectionError("transport at EOF; no more data to be read") + try: buf: bytes = await self.stdout.read(65535) except ConnectionLost as exc: