← index #10867Issue #9500
Off-topic · high · value 3.120
QUERY · ISSUE

uasyncio StreamReader fails if UART times out.

openby peterhinchopened 2023-02-26updated 2023-06-07
bug

I'm unsure if this qualifies as a bug as there is an obvious workround.

The issue arose in this report. If the UART receiver times out the device returns None which causes uasyncio to fail here.

CANDIDATE · ISSUE

RP2 uasyncio TCP server calls handler with no request (1.19.1.468 (4.10.2022))

openby msetinaopened 2022-10-04updated 2022-11-20
bugport-rp2

micropython:
Using a uasync start_server to get TCP server I get a random request with
reader.readline returning b''
The problem is that there is an allocated memory after that of most of memory (alloc:134336, free:31680) and does not get reclamed even with gc.collect

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied