Skip to content

Commit

Permalink
fix one bug about MsgUnreachable local type
Browse files Browse the repository at this point in the history
close tikv/tikv#11371
Signed-off-by: tier-cap <zhengxiaojin@pingcap.com>
  • Loading branch information
tier-cap committed Apr 21, 2022
1 parent f968d2c commit 1f58409
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/raw_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ pub enum SnapshotStatus {

/// Checks if certain message type should be used internally.
pub fn is_local_msg(t: MessageType) -> bool {
// remove MessageType::MsgUnreachable
matches!(
t,
MessageType::MsgHup
| MessageType::MsgBeat
| MessageType::MsgUnreachable
| MessageType::MsgSnapStatus
| MessageType::MsgCheckQuorum
)
Expand Down Expand Up @@ -805,7 +805,7 @@ mod test {
let tests = vec![
(MessageType::MsgHup, true),
(MessageType::MsgBeat, true),
(MessageType::MsgUnreachable, true),
(MessageType::MsgUnreachable, false),
(MessageType::MsgSnapStatus, true),
(MessageType::MsgCheckQuorum, true),
(MessageType::MsgPropose, false),
Expand Down

0 comments on commit 1f58409

Please sign in to comment.