From 79845ec3dc94570a0398bb22eb10c8ca7baedccf Mon Sep 17 00:00:00 2001 From: Bartosz Zbytniewski Date: Mon, 20 Jan 2025 10:05:29 +0100 Subject: [PATCH] Fix issue with auto-connect set until daemon restart --- daemon/rpc_connect.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/daemon/rpc_connect.go b/daemon/rpc_connect.go index 3bb940ca..2195d689 100644 --- a/daemon/rpc_connect.go +++ b/daemon/rpc_connect.go @@ -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) @@ -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