Page MenuHomePhabricator

[lib] improve handling Tunnelbroker socket state
ClosedPublic

Authored by kamil on Jun 14 2024, 5:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 5:30 AM
Unknown Object (File)
Wed, Dec 18, 5:30 AM
Unknown Object (File)
Wed, Dec 18, 5:30 AM
Unknown Object (File)
Wed, Dec 18, 5:29 AM
Unknown Object (File)
Dec 2 2024, 6:17 AM
Unknown Object (File)
Nov 28 2024, 5:45 PM
Unknown Object (File)
Nov 25 2024, 2:39 PM
Unknown Object (File)
Nov 25 2024, 1:31 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable