From 6a1bde5f3a11c303e70b2814fcba1fbce0239c8e Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Thu, 12 Dec 2024 14:50:26 -0500 Subject: [PATCH] Allow Connecting -> Connecting transition --- upstairs/src/client.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/upstairs/src/client.rs b/upstairs/src/client.rs index 781382b12..ca96fc659 100644 --- a/upstairs/src/client.rs +++ b/upstairs/src/client.rs @@ -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, @@ -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; }