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
8 changes: 8 additions & 0 deletions rocketmq-store/src/ha/default_ha_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@
}

pub async fn shutdown(&mut self) {
{
let mut state = self.current_state.write().await;
Copy link

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The shutdown implementation is duplicated in both ReadSocketService and WriteSocketService. Consider extracting the common shutdown logic into a helper method or trait to reduce code duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
*state = HAConnectionState::Shutdown;

Check warning on line 403 in rocketmq-store/src/ha/default_ha_connection.rs

View check run for this annotation

Codecov / codecov/patch

rocketmq-store/src/ha/default_ha_connection.rs#L402-L403

Added lines #L402 - L403 were not covered by tests
}
if let Some(handle) = self.service_handle.take() {
handle.abort();
let _ = handle.await;
Expand Down Expand Up @@ -626,6 +630,10 @@
}

pub async fn shutdown(&mut self) {
{
let mut state = self.current_state.write().await;
*state = HAConnectionState::Shutdown;

Check warning on line 635 in rocketmq-store/src/ha/default_ha_connection.rs

View check run for this annotation

Codecov / codecov/patch

rocketmq-store/src/ha/default_ha_connection.rs#L634-L635

Added lines #L634 - L635 were not covered by tests
}
if let Some(handle) = self.service_handle.take() {
handle.abort();
let _ = handle.await;
Expand Down
Loading