Skip to content

Commit bc6de15

Browse files
committed
chore(mcp): correct connecting-count ordering comment
1 parent d3b754f commit bc6de15

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/sim/hooks/mcp/use-mcp-oauth-popup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export function useMcpOauthPopup({ workspaceId }: UseMcpOauthPopupProps) {
5050

5151
// Per-server count of live authorization attempts; a row shows "Connecting…" / "Reopen
5252
// authorization" while its count > 0. Reference counting (not a boolean set) keeps the label
53-
// deterministic across concurrent attempts: a reopen increments before the superseded flow
54-
// decrements, so the count never dips to 0 mid-reopen (no flicker), and every attempt clears
55-
// exactly once (never stuck).
53+
// deterministic across concurrent attempts: a reopen retires the superseded flow and starts
54+
// its own count within one batched update (no flicker), and every attempt clears exactly
55+
// once (never stuck).
5656
const [connectingCounts, setConnectingCounts] = useState<Map<string, number>>(() => new Map())
5757
// OAuth `state` nonce -> { serverId, safety timeout }. `state` keys the BroadcastChannel
5858
// correlation: the callback echoes it on every result (even failures that resolve no serverId),

0 commit comments

Comments
 (0)