Skip to content
Merged
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
15 changes: 8 additions & 7 deletions rocketmq-store/src/ha/general_ha_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@

impl HAConnection for GeneralHAConnection {
async fn start(&mut self) -> Result<(), HAConnectionError> {
if let Some(ref mut connection) = self.default_ha_connection {
connection.start().await
} else if let Some(ref mut connection) = self.auto_switch_ha_connection {
connection.start().await
} else {
Err(HAConnectionError::Connection(
match (
&mut self.default_ha_connection,
&mut self.auto_switch_ha_connection,

Check warning on line 68 in rocketmq-store/src/ha/general_ha_connection.rs

View check run for this annotation

Codecov / codecov/patch

rocketmq-store/src/ha/general_ha_connection.rs#L67-L68

Added lines #L67 - L68 were not covered by tests
) {
(Some(connection), _) => connection.start().await,
(_, Some(connection)) => connection.start().await,
(None, None) => Err(HAConnectionError::Connection(

Check warning on line 72 in rocketmq-store/src/ha/general_ha_connection.rs

View check run for this annotation

Codecov / codecov/patch

rocketmq-store/src/ha/general_ha_connection.rs#L70-L72

Added lines #L70 - L72 were not covered by tests
"No HA connection set".to_string(),
))
)),

Check warning on line 74 in rocketmq-store/src/ha/general_ha_connection.rs

View check run for this annotation

Codecov / codecov/patch

rocketmq-store/src/ha/general_ha_connection.rs#L74

Added line #L74 was not covered by tests
}
}

Expand Down
Loading