Skip to content

Commit 3717798

Browse files
committed
aiorepl: Handle stream shutdown.
Signed-off-by: Andrew Leech <[email protected]>
1 parent 913498e commit 3717798

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

micropython/aiorepl/aiorepl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ async def task(g=None, prompt="--> "):
114114
curs = 0 # cursor offset from end of cmd buffer
115115
while True:
116116
b = await s.read(1)
117+
if not b: # Handle EOF/empty read
118+
break
117119
pc = c # save previous character
118120
c = ord(b)
119121
pt = t # save previous time

0 commit comments

Comments
 (0)