From ce65f6a630373d07605c591484cbeb0f3d00804c Mon Sep 17 00:00:00 2001 From: John Michael Burke Date: Tue, 5 Apr 2022 14:23:27 -0700 Subject: [PATCH 1/2] Refresh conn dialog on reconnect, reconnect on device `not found`[CPP-711] --- console_backend/src/connection.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/console_backend/src/connection.rs b/console_backend/src/connection.rs index f8e4bfe31..127fbbf70 100644 --- a/console_backend/src/connection.rs +++ b/console_backend/src/connection.rs @@ -132,6 +132,9 @@ fn conn_manager_thd( ErrorKind::NotConnected => { (true, String::from("Connection error: not connected")) } + ErrorKind::NotFound => { + (true, String::from("Connection error: not found")) + } _ => (false, format!("Connection error: {}", e)), }; error!("{}", message); @@ -139,6 +142,7 @@ fn conn_manager_thd( send_conn_notification(&client_sender, message.clone()); if !conn.is_file() { if reconnect && !shared_state.connection_dialog_visible() { + refresh_connection_frontend(&client_sender, &shared_state); manager_msg.send(ConnectionManagerMsg::Reconnect(conn)) } else { manager_msg.send(ConnectionManagerMsg::Disconnect) From 4517a15add93bbcae6aa0309754332100de73f33 Mon Sep 17 00:00:00 2001 From: John Michael Burke Date: Wed, 6 Apr 2022 10:21:00 -0700 Subject: [PATCH 2/2] Bump up linux/mac timeout. --- console_backend/src/constants.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console_backend/src/constants.rs b/console_backend/src/constants.rs index 1ecc42656..de44562a7 100644 --- a/console_backend/src/constants.rs +++ b/console_backend/src/constants.rs @@ -44,7 +44,7 @@ pub(crate) const AVAILABLE_FLOWS: &[&str] = &[ FLOW_CONTROL_SOFTWARE, FLOW_CONTROL_HARDWARE, ]; -pub(crate) const READER_TIMEOUT: Duration = Duration::from_secs(1); +pub(crate) const READER_TIMEOUT: Duration = Duration::from_secs(2); pub(crate) const CONNECTION_HISTORY_FILENAME: &str = "connection_history.yaml"; pub(crate) const MAX_CONNECTION_HISTORY: i32 = 15;