agent: Declare the stream to be CONNECTED only if a pair is selected
Don't change the state if no pair is selected. Otherwise we get a component that claims to be CONNECTED but has no selected pair. Also, set the selected pair before announcing the state change.
Showing with 10 additions and 10 deletions