Skip to content

Commit

Permalink
Update default value of ConnectedAt in Status
Browse files Browse the repository at this point in the history
Signed-off-by: hwipl <33433250+hwipl@users.noreply.github.com>
  • Loading branch information
hwipl committed May 10, 2024
1 parent 9198016 commit 00d3c95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ func (d *Daemon) Start() error {
// set initial status
d.setStatusConnectionState(vpnstatus.ConnectionStateDisconnected)
d.setStatusServers(d.profile.GetVPNServerHostNames())
d.setStatusConnectedAt(0)

go d.start()
return nil
Expand Down
4 changes: 3 additions & 1 deletion pkg/vpnstatus/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,7 @@ func NewFromJSON(b []byte) (*Status, error) {

// New returns a new Status.
func New() *Status {
return &Status{}
return &Status{
ConnectedAt: -1,
}
}

0 comments on commit 00d3c95

Please sign in to comment.