Problem
stopQRHost() in QRHost.js closes the HTTP server but never sets the server variable back to null. During a rapid reconnect, a new QR server can be requested while the previous server is still closing, which may lead to a port conflict or stale server state.
Expected behavior
After the QR host stops, the module should be ready to start a fresh server cleanly.
Acceptance criteria
- The server reference is cleared when shutdown begins or completes.
- A new QR session can start after a previous session stops without reusing stale state.
currentQrData remains cleared after shutdown.
- Repeated calls to
stopQRHost() are harmless.
Problem
stopQRHost()inQRHost.jscloses the HTTP server but never sets theservervariable back tonull. During a rapid reconnect, a new QR server can be requested while the previous server is still closing, which may lead to a port conflict or stale server state.Expected behavior
After the QR host stops, the module should be ready to start a fresh server cleanly.
Acceptance criteria
currentQrDataremains cleared after shutdown.stopQRHost()are harmless.