Skip to content

Commit

Permalink
Allow Connecting -> Connecting transition
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Dec 12, 2024
1 parent a033afb commit 6a1bde5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions upstairs/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,16 @@ impl DownstairsClient {
use NegotiationState as N;
use UpstairsState as U;
match (prev_state, next_state) {
(
D::Connecting { .. },
D::Connecting {
state: N::Start { .. },
..
},
) => {
// restarting negotiation is allowed
true
}
(
D::Connecting {
state: prev_state,
Expand All @@ -982,6 +992,7 @@ impl DownstairsClient {
mode: next_mode,
},
) => {
// Check normal negotiation path
if next_mode == C::New && matches!(up_state, U::Active) {
return false;
}
Expand Down

0 comments on commit 6a1bde5

Please sign in to comment.