From 4e04f7338ef91c4c63519bd5f06304547666f82b Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Tue, 17 Jun 2025 15:04:39 +1000 Subject: [PATCH] aiorepl: Handle stream shutdown. Signed-off-by: Andrew Leech --- micropython/aiorepl/aiorepl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/micropython/aiorepl/aiorepl.py b/micropython/aiorepl/aiorepl.py index 8f45dfac0..fad113f09 100644 --- a/micropython/aiorepl/aiorepl.py +++ b/micropython/aiorepl/aiorepl.py @@ -114,6 +114,8 @@ async def task(g=None, prompt="--> "): curs = 0 # cursor offset from end of cmd buffer while True: b = await s.read(1) + if not b: # Handle EOF/empty read + break pc = c # save previous character c = ord(b) pt = t # save previous time