diff --git a/core/archipelago/src/mesh/listener/session.rs b/core/archipelago/src/mesh/listener/session.rs index 140e39e1..c6fb1de7 100644 --- a/core/archipelago/src/mesh/listener/session.rs +++ b/core/archipelago/src/mesh/listener/session.rs @@ -1012,31 +1012,48 @@ pub(super) async fn run_mesh_session( ) .await } else if let Some(path) = preferred_path { - match open_preferred_path( - path, - data_dir, - our_ed_pubkey_hex, - our_x25519_pubkey_hex, - device_kind, - Some(&desired_advert_name), - ) - .await - { - Ok((dev, info)) => Ok((path.to_string(), dev, info)), - Err(e) => { - warn!( - "Preferred path {} probe failed: {} — trying auto-detect", - path, e - ); - auto_detect_and_open( - data_dir, - our_ed_pubkey_hex, - our_x25519_pubkey_hex, - device_kind, - Some(path), - Some(&desired_advert_name), - ) - .await + if device_kind.is_none() { + // Unpinned: open_preferred_path bails without ever touching + // the port, so the preferred path has NOT been probed this + // cycle — auto-detect must keep it as a candidate + // (skip_path=None). Passing Some(path) here excluded the only + // radio on single-device nodes and the mesh never came up. + auto_detect_and_open( + data_dir, + our_ed_pubkey_hex, + our_x25519_pubkey_hex, + device_kind, + None, + Some(&desired_advert_name), + ) + .await + } else { + match open_preferred_path( + path, + data_dir, + our_ed_pubkey_hex, + our_x25519_pubkey_hex, + device_kind, + Some(&desired_advert_name), + ) + .await + { + Ok((dev, info)) => Ok((path.to_string(), dev, info)), + Err(e) => { + warn!( + "Preferred path {} probe failed: {} — trying auto-detect", + path, e + ); + auto_detect_and_open( + data_dir, + our_ed_pubkey_hex, + our_x25519_pubkey_hex, + device_kind, + Some(path), + Some(&desired_advert_name), + ) + .await + } } } } else {