Skip to content

Commit

Permalink
fix errors condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpalide committed Jan 27, 2024
1 parent 4d48a02 commit 1f934db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/skysocks-monitor/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (api *API) isOnline(key cipher.PubKey) (ok bool) {
if len(sum) > 0 {
latency = sum[0].Latency
}
case vpn.ErrSetupNode, vpn.ErrNotPermitted:
case vpn.ErrNotPermitted:
api.logger.WithError(skysocksErr).Infof("Skysocks error on %v transport of %v.", transport, key)
default:
api.logger.WithError(skysocksErr).Infof("Skysocks error on %v transport of %v.", transport, key)
Expand Down Expand Up @@ -338,9 +338,6 @@ func RunSkysocksClient(v *visor.Visor, serverPK cipher.PubKey, appName string) (

time.Sleep(time.Second * 15)
appErr, _ := v.GetAppError(appName) //nolint
if appErr == vpn.ErrSetupNode.Error() {
return []appserver.ConnectionSummary{}, vpn.ErrSetupNode
}
if appErr == vpn.ErrNotPermitted.Error() {
return []appserver.ConnectionSummary{}, vpn.ErrNotPermitted
}
Expand Down

0 comments on commit 1f934db

Please sign in to comment.