relayx/device-cpp

0.1.7

Latest
uploaded 1 day ago
RelayX C++ Device SDK for ESP32

Changelog

# Changelog

All notable changes to the RelayX C++ Device SDK are documented here.

## [0.1.7] - 2026-06-09

### Fixed

- **TLS task stack overflow.** Raised the default stacks for the internal
  `relay_process` (4096 → 16384) and `relay_publisher` (4096 → 8192) tasks.
  The old 4096 default overflowed during the mbedTLS handshake under TLS,
  surfacing as a hardware "Stack protection fault" (`mcause 27` on RISC-V
  targets like the ESP32-C6/H2). Both are overridable via
  `RELAY_PROCESS_TASK_STACK_SIZE` / `RELAY_PUBLISH_TASK_STACK_SIZE`.

- **Use-after-free when `process()` is driven from a second task.** `process()`
  now serializes itself with a try-lock, so calling it from application code in
  addition to the SDK's internal `relay_process` task can no longer race the
  reconnect path (which deletes/recreates the NATS client). Previously this
  caused a load-access fault (`mcause 5`) inside `connect_with_transport` under
  reconnect churn.

- **Publisher stranding after a flaky reconnect.** The async publisher's
  connection gate (`BIT_CONNECTED`) is now kept in lockstep with the real
  connection state on every process tick. A desync could leave telemetry, logs,
  and events buffered indefinitely while RPC replies (a separate send path) kept
  working — i.e. "RPCs respond but nothing else publishes." That stranding is no
  longer possible.

### Notes

- No API changes. You still do not need to call `device->process()` yourself —
  the SDK drives its own loop. Calling it remains safe but redundant.

Links

Supports all targets

To add this component to your project, run:

idf.py add-dependency "relayx/device-cpp^0.1.7"

download archive

Stats

  • Archive size
    Archive size ~ 128.09 KB
  • Downloaded in total
    Downloaded in total 7 times
  • Weekly Downloads Weekly Downloads (All Versions)
  • Downloaded this version
    This version: 0 times

Badge

relayx/device-cpp version: 0.1.7
|