HomePhabricator
Diffusion Comm 6cd543112f87

[lib] Retry Tunnelbroker connection after closing

Description

[lib] Retry Tunnelbroker connection after closing

Summary:
Details in ENG-9246.
Added a retry counter variable and a timeout.

  • The effect hook has dependency on this variable
  • It is increased after each retry
  • Retry has to have interval to avoid infinite effect loop. Defaulted to 5s

Previously, effect wasn't triggered if socketState.connected was already false. Change false -> false doesn't trigger the hook, so socket wasn't recreated.

Test Plan:

  • On native: Turned airplane mode on/off.
  • On web: turned wifi on/off.

Observed console logs. The connection was successfully restored after network coming back.

Reviewers: kamil, tomek

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D13382

Details

Provenance
bartekAuthored on Sep 18 2024, 6:19 AM
Reviewer
kamil
Differential Revision
D13382: [lib] Retry Tunnelbroker connection after closing
Parents
rCOMM6b1993c351f2: Revert "[native] Temporary changes for staff release"
Branches
Unknown
Tags
Unknown