Repository navigation
Pre-1.0: the API may still change. No change of the exported API against v0.2.1.
Fixes three defects of subscriptions and notifications.
Changed behaviour
UnsubscribeandUnsubscribeIDcarry the removal through whatever happens to their context, which bounds only the wait. A later subscription to the same object is sent after it. While the connection is lost they return nil: the subscription went with the session.NotifyWaitreturns one result for a subscriber that ubusd lists several times. It is done when every delivery is answered, holds the data of all and the first status other thanStatusOK.
Fixed
UnsubscribeorUnsubscribeIDwith an already ended context forgot the subscription without removing it at ubusd; subscribing again then delivered twice.- A target removed before the subscription to it was recorded left a path subscription marked as made, so it was not made again when the object returned. A watched path now stays pending; a
Subscribethat was making the subscription returnsStatusNotFound. NotifyWaitdid not return before its context ended when another client had subscribed the same subscriber to the object twice.
Known issues
- If the removal request of
UnsubscribeorUnsubscribeIDcannot be sent in time, the subscription stays at ubusd until theSubscriberis closed, and subscribing again then delivers twice. See the changelog.
Verification
Compatibility and unit tests on an MT7981 router (OpenWrt 25.12.5, arm64) and an Orange Pi Zero (OpenWrt 21.02.2, ARMv7); an arm64 virtual machine with ubusd of OpenWrt 21.02 and 25.12 (race detector included); scripts/ci.sh and GitHub Actions.
10 minute stress runs passed on both routers. Not run for this release: emulation, 10 minute stress runs on the virtual machine, benchmarks:
docs/compatibility.md.
See CHANGELOG.md.