fix: connect() no longer falls through from mux to USB serial

When a mux socket file exists, connect(None, timeout) and try_connect()
now commit to the mux — returning an error if unreachable instead of
silently falling through to USB serial. This prevents a race condition
where a client could steal the serial port from the mux during reconnect.

Callers with explicit port = Some(...) are unaffected.
This commit is contained in:
swaits committed 2026-04-07 18:04:07 -06:00
1 parent a7e93ab56b
commit 77addfa698
4 files changed
+29 -33

No files matched your search

Generated
+1 -1
View File
@@ -44,7 +44,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "donglora-client"
version = "0.2.0"
version = "0.2.1"
dependencies = [
"anyhow",
"serialport",