Skip to content

Commit

Permalink
Fix issue with auto-connect set until daemon restart
Browse files Browse the repository at this point in the history
  • Loading branch information
devzbysiu committed Jan 22, 2025
1 parent 040fcd4 commit 79845ec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion daemon/rpc_connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ func (r *RPC) connect(
event.TargetServerIP = subnet.Addr().String()
event.DurationMs = max(int(time.Since(connectingStartTime).Milliseconds()), 1)

r.ConnectionParameters.SetConnectionParameters(
pb.ConnectionSource_MANUAL,
ServerParameters{
Country: cfg.AutoConnectData.Country,
City: cfg.AutoConnectData.City,
Group: cfg.AutoConnectData.Group,
})

// Send the connection attempt event
r.events.Service.Connect.Publish(event)

Expand Down Expand Up @@ -221,7 +229,6 @@ func (r *RPC) connect(
)),
true, // here vpn connect - enable routing to local LAN
)

if err != nil {
event.DurationMs = max(int(time.Since(connectingStartTime).Milliseconds()), 1)
event.Error = err
Expand Down

0 comments on commit 79845ec

Please sign in to comment.