@@ -575,28 +575,25 @@ impl DownstairsClient {
575
575
// go through the live-repair path.
576
576
DsState :: Stopping ( ClientStopReason :: NegotiationFailed ( ..) ) => {
577
577
match up_state {
578
- // If we haven't activated yet, then start from New
578
+ // If we haven't activated yet (or we're deactivating) then
579
+ // start from New
579
580
UpstairsState :: GoActive ( ..)
580
- | UpstairsState :: Initializing => ConnectionMode :: New ,
581
+ | UpstairsState :: Initializing
582
+ | UpstairsState :: Deactivating { .. } => ConnectionMode :: New ,
581
583
582
584
// Otherwise, use live-repair
583
- UpstairsState :: Active
584
- | UpstairsState :: Deactivating { .. } => {
585
- ConnectionMode :: Faulted
586
- }
585
+ UpstairsState :: Active => ConnectionMode :: Faulted ,
587
586
}
588
587
}
589
588
590
589
DsState :: Stopping ( ClientStopReason :: Replacing ) => match up_state {
591
590
// If we haven't activated yet, then start from New
592
- UpstairsState :: GoActive ( ..) | UpstairsState :: Initializing => {
593
- ConnectionMode :: New
594
- }
591
+ UpstairsState :: GoActive ( ..)
592
+ | UpstairsState :: Initializing
593
+ | UpstairsState :: Deactivating { .. } => ConnectionMode :: New ,
595
594
// Otherwise, use live-repair; `ConnectionMode::Replaced`
596
595
// indicates that the address is allowed to change.
597
- UpstairsState :: Active | UpstairsState :: Deactivating { .. } => {
598
- ConnectionMode :: Replaced
599
- }
596
+ UpstairsState :: Active => ConnectionMode :: Replaced ,
600
597
} ,
601
598
} ;
602
599
let new_state = DsState :: Connecting {
0 commit comments