Block on graceful disconnect to prevent stale radio sessions (#1996)#1997
Merged
Block on graceful disconnect to prevent stale radio sessions (#1996)#1997
Conversation
The disconnect commands (stream remove + client disconnect) were queued asynchronously via AutoConnection, so the app could exit before they reached the radio. Use BlockingQueuedConnection to ensure the graceful disconnect completes before closeEvent returns. Co-Authored-By: Claude Opus 4.6 <[email protected]>
2 tasks
jensenpat
approved these changes
Apr 26, 2026
Collaborator
jensenpat
left a comment
There was a problem hiding this comment.
The change is tiny and aimed at the right race: MainWindow::closeEvent() calls RadioModel::disconnectFromRadio(), and the PR makes that wait for the worker-thread gracefulDisconnect() to run before teardown continues. CI is green.
Only residual watch item: Qt::BlockingQueuedConnection can stall the UI while the worker drains its queue plus the existing waitForBytesWritten(500), and it would be dangerous if called after the connection thread stopped. In this lifecycle the connection thread is still running during close, so I’d treat that as acceptable rather than a blocker.
ten9876
added a commit
that referenced
this pull request
Apr 27, 2026
Local iambic CW keyer (#2079), unified sidetone controls, CW pan slider wiring, slice capacity notification (#48), three latent netcw protocol bugs that prevented CW transmit on FLEX-8600 v4.1.5 firmware, optimistic updates for cwIambic/iambicMode/cwSpeed/cwPitch, PortAudio JACK preference for sub-5 ms sidetone on Linux, plus the graceful disconnect (#1997), memory recall (#2080), per-slice compression meter (#2073), and m_activeTxSlice (#2078) fixes from the community. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2 tasks
2 tasks
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.
Summary
Fixes #1996
What was changed
Block on graceful disconnect to prevent stale radio sessions (#1996)
Files modified
src/models/RadioModel.cppGenerated by AetherClaude (automated agent for AetherSDR)