Skip to content

Preserve persistent sessions on WebSocket close - #573

Merged
embhorn merged 1 commit into
wolfSSL:masterfrom
aidangarske:fix/websocket-persistent-session
Aug 13, 2026
Merged

Preserve persistent sessions on WebSocket close#573
embhorn merged 1 commit into
wolfSSL:masterfrom
aidangarske:fix/websocket-persistent-session

Conversation

@aidangarske

Copy link
Copy Markdown
Member
F-8593

@aidangarske aidangarske self-assigned this Aug 12, 2026
Copilot AI lite review requested due to automatic review settings August 12, 2026 19:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the embedded broker’s libwebsockets close-handling so that clients with persistent sessions keep their session state when the underlying WebSocket is closed, aligning WS teardown behavior with the broker’s existing session-persistence model.

Changes:

  • On LWS_CALLBACK_CLOSED, publish the client’s Will and then either remove or orphan subscriptions based on session persistence.
  • Add a forward declaration for BrokerSubs_OrphanClient for use in the WS callback.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/mqtt_broker.c Outdated
@aidangarske
aidangarske force-pushed the fix/websocket-persistent-session branch from 081ed1b to faf11dc Compare August 12, 2026 19:43
@aidangarske
aidangarske requested a review from embhorn August 12, 2026 20:15
@embhorn
embhorn merged commit 4d4774c into wolfSSL:master Aug 13, 2026
47 of 48 checks passed
@aidangarske
aidangarske deleted the fix/websocket-persistent-session branch August 13, 2026 16:31
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.

3 participants