mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-17 01:44:25 +00:00
ArduinoJson v7 hands out document-pool blocks in fixed 4096-byte chunks, so the pool is not bounded by the size of the text it serialises to. Budgeting it at NEIGHBORS_JSON_BUFFER_SIZE starved it once the table grew: a 50-entry table needs 12541 B of pool against the 10240 B cap, and a starved allocator sets doc.overflowed(), which makes buildNeighborsMessage return 0 and drop the entire publish rather than truncating the tail. Repeaters with roughly 40 or more neighbours therefore published no neighbors message at all, silently, while smaller tables published normally. Give the pool its own NEIGHBORS_DOC_POOL_BUDGET and add an explicit NEIGHBORS_MAX_PUBLISH_ENTRIES cap alongside the existing text-size check.