Skip to content

fix: reuse one MQTT TLS session for TUI dashboard and monitor - #114

Merged
DLANSAMA merged 1 commit into
mainfrom
refactor/aaa-pr5-session-reuse
Aug 13, 2026
Merged

fix: reuse one MQTT TLS session for TUI dashboard and monitor#114
DLANSAMA merged 1 commit into
mainfrom
refactor/aaa-pr5-session-reuse

Conversation

@DLANSAMA

Copy link
Copy Markdown
Owner

AAA stack 5/9. Stacked on #113.

The TUI was opening a new MQTT TLS session on every dashboard/monitor refresh. BambuPrinter.hold_mqtt() / release_mqtt() keep one session; MqttSession is the reusable connection. PlateApp releases on quit/unmount so the paho loop thread does not leak (CI runs -W error::ResourceWarning).

One-shot CLI commands still connect and tear down.

Stack: #110#111#112#113this → Textual 8 / 3.10 → test stubs → sole error path → honesty

BambuPrinter.hold_mqtt() keeps a single paho client for status,
send_command, and get_version. The TUI caches one StatusService and
releases the session on quit/unmount. One-shot CLI commands still
connect and tear down. Reconnect cannot re-issue a published command.
@DLANSAMA
DLANSAMA force-pushed the refactor/aaa-pr5-session-reuse branch from 100c10a to ad7a2fa Compare August 13, 2026 03:40
@DLANSAMA
DLANSAMA merged commit 28475cc into main Aug 13, 2026
6 of 12 checks passed
@DLANSAMA
DLANSAMA deleted the refactor/aaa-pr5-session-reuse branch August 13, 2026 03:49
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.

1 participant