-
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
bugSomething isn't workingSomething isn't workinglow-priorityDevelopment can continue without itDevelopment can continue without itnmrsChanges to nmrsChanges to nmrs
Description
nmrs/nmrs/src/core/state_wait.rs
Lines 55 to 62 in 85ab4f5
| // Subscribe to signals FIRST to avoid race condition | |
| let mut stream = active_conn.receive_activation_state_changed().await?; | |
| debug!("Subscribed to ActiveConnection StateChanged signal"); | |
| // Check current state - if already terminal, return immediately | |
| let current_state = active_conn.state().await?; | |
| let state = ActiveConnectionState::from(current_state); | |
| debug!("Current active connection state: {state}"); |
We subscribe to signals AFTER creating the proxy, but there's still a window between subscription and checking current state where a state change could be missed.
If the state changes between subscribing and checking, we might miss it.
So I guess technically this is actually handled correctly (subscribe first, then check), but we should add a re-check after the loop to catch any state changes that occurred during the gap.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinglow-priorityDevelopment can continue without itDevelopment can continue without itnmrsChanges to nmrsChanges to nmrs