Conversation
start_server() is deprecated at v0.8.0, and CI builds with -Werror, so the rename is forced rather than optional. stop() replaces the disconnect() plus hand-rolled drain loop: it goodbyes every peer and delivers on_stream_end() before returning, so the stop hook is queued by the time control comes back and hooks.flush() runs it. That makes SHUTDOWN_DRAIN_MS and its timeout warning dead. liveness_timeout_ms is left unset, taking the library's derived ~60 s default. MAX_RETRY_DELAY_MS re-checked against NURSERY_ESTABLISH_TIMEOUT_S, still 30 s.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The lifecycle migration is correct; only minor documentation inaccuracies remain.
Pull request overview
Pins sendspin-cpp v0.8.0 and adopts its lifecycle API.
Changes:
- Replaces
start_server()withstart(). - Replaces manual disconnect/draining with synchronous
stop(). - Refreshes lifecycle documentation and upstream version references.
File summaries
| File | Description |
|---|---|
CMakeLists.txt |
Pins sendspin-cpp v0.8.0. |
src/main.cpp |
Migrates startup and shutdown lifecycle calls. |
src/audio_sink.h |
Updates lifecycle references. |
docs/ROADMAP.md |
Refreshes upstream references and shutdown documentation. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: chrisuthe <26907395+chrisuthe@users.noreply.github.com>
chrisuthe
deleted the
chrisuthe/task/re-pin-sendspin-cpp-to-v0-8-0-and-adopt-its-start
branch
September 16, 2026 02:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-pins
SENDSPIN_GIT_TAGtov0.8.0and moves onto the lifecycle API that release introduces.What changed
start_server()→start(). The old name is[[deprecated]]at v0.8.0 and CI configures with-DSENDSPIN_CLI_WERROR=ON, so this was a hard build failure, not a warning. Comments naming the old symbol insrc/main.cppandsrc/audio_sink.hfollow.disconnect()+ drain loop →client.stop().stop()goodbyes every peer (reasonshutdown, same as before), waits a bounded time, and deliverson_stream_end()inline before returning — so the stop hook is queued by the time control comes back and the existinghooks.flush()runs it. That retiresSHUTDOWN_DRAIN_MSand its timeout warning. Shutdown ordering is unchanged: mDNS and the control socket first, then the client, then unwiring the lambda that captures main's locals.liveness_timeout_msleft unset, taking the library's derived ~60 s default. No new flag, config key, wiki row or packaging entry.MAX_RETRY_DELAY_MSre-checked against upstreamNURSERY_ESTABLISH_TIMEOUT_S, still30.0at v0.8.0 — the constant stands.docs/ROADMAP.mdre-verified. Every version-tagged claim was re-read against the v0.8.0 tree and retagged; items 17 and 25 stay gated (still noactivities/server/activate, still no bind address onSendspinClientConfig), thesync_task.cppline citation was corrected, and the shutdown bullet describing the old drain loop was rewritten.Verification
-DSENDSPIN_CLI_WERROR=ONbuild green with no deprecation warnings.--versionreportssendspin-cpp v0.8.0.scripts/smoke_test.shevery check passed;scripts/format.sh --checkclean under clang-format 20.1.8.client/goodbye,Stream ended, the stop hook firing, and exit 0.Note for reviewers running the suite locally: two control-socket tests fail if the checkout path is long enough to push the socket path past
sockaddr_un's 107 bytes. They pass from a shorter path, and CI's is short.Compatibility
No breaking changes for CLI users. Checked deliberately, since a pin bump can change behaviour without touching a flag:
sendspin-cli.conf.exampleentry changed.liveness_timeout_msis deliberately left unset and no flag exposes it.Three visible differences that are not breaking, but worth knowing:
RetryPacerthen redials on its own, so this recovers a wedge that used to persist. Strictly an improvement, but it is new runtime behaviour."The stream did not end within 500 ms of disconnecting -- any --hook-stop has not run"no longer exists, because the case it warned about no longer exists:stop()deliverson_stream_end()before returning, so the stop hook always runs. Anything grepping logs for that string won't find it. Shutdown is now bounded by the library (50 ms per peer for goodbyes, ~300 ms for a WebSocket close, worst case the 3 s handshake timeout for a socket that connected and never upgraded) rather than by the 500 ms drain cap — comparable in wall-clock, since the old path paid the same transport teardown in the client destructor. Well inside systemd's default 90 sTimeoutStopSec; our unit sets none.--versionreportssendspin-cpp v0.8.0on its second line, which only matters to something pinning that string.