Skip to content

Commit 4e04f73

Browse files
committed
aiorepl: Handle stream shutdown.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent 5b496e9 commit 4e04f73

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy