skywire icon indicating copy to clipboard operation
skywire copied to clipboard

Improve systray VPN button initialization

Open mrpalide opened this issue 3 years ago • 0 comments

Did you run make format && make check? Yes

Fixes # _

Changes:

  • add IsDMSGClientReady method to visor for checking availability of dmsg-client [dmsgC]. we use setupPK to check routes, and setupPK use dmsg actually, then need dmsgC be ready to use it. If dmsgC not ready then VPN button on systray not available. It will check each 10 seconds.
  • add retrying logic to fetch vpn-servers from SD

How to test this PR:

  • Clone PRs branch
  • add time.Sleep(20 * time.Second) in line 296 of init.go in pkg > visor > init.go. Should be like :
    go func() {
      defer wg.Done()
      time.Sleep(30 * time.Second)
      dmsgC.Serve(context.Background())
    }()
    
  • make build-systray and run visor
  • check logs

mrpalide avatar Jul 05 '22 02:07 mrpalide