Skip to content

Block on graceful disconnect to prevent stale radio sessions (#1996)#1997

Merged
ten9876 merged 1 commit intomainfrom
aetherclaude/issue-1996
Apr 27, 2026
Merged

Block on graceful disconnect to prevent stale radio sessions (#1996)#1997
ten9876 merged 1 commit intomainfrom
aetherclaude/issue-1996

Conversation

@aethersdr-agent
Copy link
Copy Markdown
Contributor

Summary

Fixes #1996

What was changed

Block on graceful disconnect to prevent stale radio sessions (#1996)

Files modified

  • src/models/RadioModel.cpp
 src/models/RadioModel.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

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]>
Copy link
Copy Markdown
Collaborator

@jensenpat jensenpat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jensenpat jensenpat enabled auto-merge (squash) April 26, 2026 23:35
@ten9876 ten9876 merged commit b59d566 into main Apr 27, 2026
5 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-1996 branch April 27, 2026 04:49
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Closing AetherSDR application hangs session and requires radio to be rebooted

3 participants