Skip to content

Commit 303026b

Browse files
fixup! fix: handle dealer reconnect in-place without restarting spirc
Restore break on initial handle_connection_id_update failure. Only tolerate errors after connect_established is true (re-registration after dealer reconnect). Without this, a failed initial registration leaves the device in connect_established=false where local commands are silently ignored.
1 parent 48adba0 commit 303026b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

connect/src/spirc.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,13 @@ impl SpircTask {
511511
connection_id_update,
512512
match |connection_id| if let Err(why) = self.handle_connection_id_update(connection_id).await {
513513
error!("failed handling connection id update: {why}");
514+
if !self.connect_established {
515+
// Initial registration failed — can't process
516+
// commands without it, so restart spirc.
517+
break;
518+
}
519+
// Re-registration after dealer reconnect failed —
520+
// stay alive, next connection_id push will retry.
514521
}
515522
},
516523
// main dealer update of any remote device updates

0 commit comments

Comments
 (0)