You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[fix][proxy] Only go to connecting state once (#19331)
Relates to: #17831 (comment)
### Motivation
When the `ProxyConnection` handles a `Connect` command, that is the time to go to `Connecting` state. There is no other time that makes sense to switch to connecting. The current logic will go to connecting in certain re-authentication scenarios, but those are incorrect. By moving the state change to earlier in the logic, we make the state transition clearer and prevent corrupted state.
### Modifications
* Remove `state = State.Connecting` from the `doAuthentication` method, which is called multiple times for various reasons
* Add `state = State.Connecting` to the start of the `handleConnect` method.
### Verifying this change
The existing tests will verify this change, and reading through the code makes it clear this is a correct change.
### Does this pull request potentially affect one of the following parts:
Not a breaking change.
### Documentation
- [x] `doc-not-needed`
It would be nice to map out the state transitions for our connection classes. That is our of the scope of this small improvement.
### Matching PR in forked repository
PR in forked repository: michaeljmarshall#21
(cherry picked from commit c8650ce)
0 commit comments