aiorepl: Handle stream shutdown.

Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
pull/1026/head
Andrew Leech 2025-06-17 15:04:39 +10:00
rodzic 913498ef05
commit 371779815b
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -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