From d1faaafe4e3e6dc62f35e9f9aaacb731b5baecc0 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Tue, 8 Feb 2022 18:23:16 -0800 Subject: [PATCH] Fix the spin bit becoming immediately disabled for servers We were disabling it every time we updated the remote CID, and we like to update the remote CID ASAP for servers to enable client-side stateless resets. Instead, we should disable it only when switching remote CIDs due to a migration. --- quinn-proto/src/connection/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quinn-proto/src/connection/mod.rs b/quinn-proto/src/connection/mod.rs index 92dd8171c..b7ecb432a 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -2574,6 +2574,7 @@ impl Connection { self.migrate(now, remote); // Break linkability, if possible let _ = self.update_rem_cid(); + self.spin = false; } Ok(()) @@ -2631,9 +2632,6 @@ impl Connection { reset_token, )); self.peer_params.stateless_reset_token = Some(reset_token); - - // Reduce linkability - self.spin = false; } /// Issue an initial set of connection IDs to the peer