Files
meshtastic_firmware/src
Carlos Valdes d89f3eb8fc fix(api): bound the stream drain so a full config dump can't starve the watchdog (#11164)
writeStream() drained the whole queue in one call - "send every packet we can".
A client asking for the full config gets the node database, then the file
manifest, then the packet backlog and the position replay, and none of that
returns to loop(). On a full node database (120 entries) the dump runs past
eight seconds, so on RP2350, where rp2040Loop() arms an 8s hardware watchdog
and is the only thing that calls watchdog_update(), the board resets in the
middle of the manifest. Reproducible on every connection; with a small node
database the dump finished under the timeout and nothing looked wrong.

Measured on a pico2_w5500_e22: last loop iteration at millis=27242, ServerAPI
kept logging until uptime 35s, reset at 35.2s = 27.242 + 8.0.

Take a slice instead. The PhoneAPI state machine is resumable, so writeStream()
stops after STREAM_WRITE_BUDGET_MSEC and reports whether anything is left;
runOncePart() then asks to be re-run immediately rather than sleeping out
readStream's idle delay, so the dump keeps its throughput while loop() gets to
feed the watchdog between slices. Backpressure on a retained frame still
returns the normal delay - re-running at once would just spin on a full
transport.

Verified on hardware: 10/10 full config dumps against a node with 120 entries,
no resets, dump still completes in ~8s.
2026-08-04 14:14:08 +00:00
..
2026-07-20 11:55:17 +02:00
2026-07-20 11:55:17 +02:00
2026-01-29 05:56:19 -06:00
2026-02-19 07:16:33 -06:00
2026-05-11 11:46:13 -05:00
2026-07-01 19:01:27 -05:00
2026-07-01 19:01:27 -05:00
2026-07-20 11:55:17 +02:00
2023-01-21 21:23:24 +01:00
2026-08-03 01:30:36 +00:00
2026-08-03 01:30:36 +00:00
2026-07-01 19:01:27 -05:00
2026-07-16 18:57:50 -05:00
2026-07-20 11:55:17 +02:00
2026-07-20 11:55:17 +02:00