ref: Prevent crashes when advertising >16 syncgroups
Currently two related crashes will occur should the user have more
than 16 syncgroups. The root of the cause is Serve() will start
advertising each syncgroup, and if the platform has BLE then
some will fail as the current BLE implementation can only support
16 total advertisements. If BLE advertisement fails, one crash was
a null dereference of the advertisement's stop(). Note CL #23804
fixed this type of crash in one place in the function there was
another where stop could be nil and dereferenced.
The other crash is a vlog.Fatal should advertising syncgroups fail. This
CL allows advertising to continue (only logging errors) should at least
one plugin work. That way BLE can work up to its max, but mDNS can
continue advertising all syncgroups. This is one solve the >16 BLE
advertisements issue with BLE, filed as vanadium/issues#1404.
Closes vanadium/issues#1390, vanadium/issues#1403, vanadium/issues#1398
2 files changed