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

Change-Id: I07fee516a5246ad8ff72e1107158c16f33d68562
2 files changed
tree: 834f6fc130780aeff18bf46cf63100a717ea7a7b
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTING.md
  11. CONTRIBUTORS
  12. envvar.go
  13. envvar_test.go
  14. LICENSE
  15. PATENTS
  16. README.md
  17. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.