From cca6c0f2bd632397b42cefebd8326b9dc790b814 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Fri, 1 Apr 2022 16:20:52 +0430 Subject: [PATCH] add status=3 for vpn client as connecting --- pkg/app/launcher/app_state.go | 3 +++ pkg/app/launcher/launcher.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/pkg/app/launcher/app_state.go b/pkg/app/launcher/app_state.go index 3ff33130a..553f7ffd5 100644 --- a/pkg/app/launcher/app_state.go +++ b/pkg/app/launcher/app_state.go @@ -12,6 +12,9 @@ const ( // AppStatusErrored represents status of an errored App. AppStatusErrored + + // AppVPNClientConnecting represents status of VPN client connecting. + AppVPNClientConnecting ) // AppState defines state parameters for a registered App. diff --git a/pkg/app/launcher/launcher.go b/pkg/app/launcher/launcher.go index a51f08f58..2ac8950da 100644 --- a/pkg/app/launcher/launcher.go +++ b/pkg/app/launcher/launcher.go @@ -16,6 +16,7 @@ import ( "github.com/skycoin/dmsg/pkg/dmsg" "github.com/skycoin/skywire-utilities/pkg/cipher" + "github.com/skycoin/skywire/internal/vpn" "github.com/skycoin/skywire/pkg/app/appcommon" "github.com/skycoin/skywire/pkg/app/appnet" "github.com/skycoin/skywire/pkg/app/appserver" @@ -202,6 +203,9 @@ func (l *Launcher) AppStates() []*AppState { if connSummary != nil { state.Status = AppStatusRunning } + if state.DetailedStatus == vpn.ClientStatusConnecting { + state.Status = AppVPNClientConnecting + } } states = append(states, state) }