Page MenuHomePhabricator

[lib] improve handling Tunnelbroker socket state
ClosedPublic

Authored by kamil on Fri, Jun 14, 5:37 AM.
Tags
None
Referenced Files
F2118891: D12440.id.diff
Wed, Jun 26, 12:00 PM
Unknown Object (File)
Tue, Jun 25, 2:38 PM
Unknown Object (File)
Tue, Jun 25, 4:11 AM
Unknown Object (File)
Mon, Jun 24, 4:04 PM
Unknown Object (File)
Sat, Jun 22, 3:59 AM
Unknown Object (File)
Fri, Jun 21, 11:07 AM
Unknown Object (File)
Fri, Jun 21, 12:15 AM
Unknown Object (File)
Thu, Jun 20, 11:45 AM
Subscribers

Details

Summary

Previously there was an edge case:

  1. Tunnelbroker socket state is connected: true and isAuthorized: false
  2. After calling setUnauthorizedDeviceID(false) the state is connected: true and isAuthorized: true, but the connection is still opened using the unauthorized type
  3. Next, the socket is closed and the state is connected: false and isAuthorized: true
  4. After the authenticating socket is in state connected: true and isAuthorized: true

As you can see - both 2 and 4 return the same result, but point 2 is not correct. This diff fixes this.

This bug can cause issues described in ENG-8385

Test Plan

Test switching from unauthorized to authorized session

Diff Detail

Repository
rCOMM Comm
Branch
improvements
Lint
No Lint Coverage
Unit
No Test Coverage