From 3be575abcb9b2e5eb74652149fdbbf1739ae715e 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 ed6273253..ae0edcb1e 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -2565,6 +2565,7 @@ impl Connection { self.migrate(now, remote); // Break linkability, if possible let _ = self.update_rem_cid(); + self.spin = false; } Ok(()) @@ -2622,9 +2623,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