Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions console_backend/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,17 @@ 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);
log::logger().flush();
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)
Expand Down
2 changes: 1 addition & 1 deletion console_backend/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down