fix(qconnect): announce the persisted device name when the socket reconnects
The initial connect threaded the custom device name into the join payload, but
the in-loop reconnect passed None on both hosts, so the rejoin announced the
default "Qbz - {hostname}" while the local identity kept resolving the saved
name. One device_uuid with two friendly names breaks the renderer self-match
when ADD_RENDERER omits the uuid, and the renderer then goes mute.
The reconnect now reads the same persisted name the local identity, the
deferred renderer join and the LAN projection already use. Nothing else in the
reconnect lane changes: no order, timing, backoff, join reason or rejoin
difference. A debug line records the announced name.
Verified by smoke test: a real WebSocket drop rejoined announcing the custom
name, and the iOS client kept both the name and control.
cc
This commit is contained in:
3 files changed
+13
-5
No files matched your search
@@ -4663,8 +4663,12 @@ impl SessionLoopHost for QtSessionLoopHost {
|
||||
log::warn!("[QConnect] reconnect credential refresh failed: {error}");
|
||||
}
|
||||
}
|
||||
// Announce the same persisted name the local identity matches against;
|
||||
// the default name would break the renderer self-match after reconnect.
|
||||
let device_name = load_persisted_device_name();
|
||||
log::info!("[QConnect] reconnect: announcing device name {device_name:?}");
|
||||
if let Err(err) =
|
||||
bootstrap_remote_presence(&self.app, None, &self.authority, self.stamp).await
|
||||
bootstrap_remote_presence(&self.app, device_name, &self.authority, self.stamp).await
|
||||
{
|
||||
if !self.authority.is_current(self.stamp) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user