From 61c06c7dd20d0014b3488817b55b91040291c790 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Fri, 26 Jul 2024 13:40:43 +0200 Subject: [PATCH] Avoid unnecessary wg reconfiguration --- client/internal/peer/conn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/internal/peer/conn.go b/client/internal/peer/conn.go index abb5fc458..a02ab7d9c 100644 --- a/client/internal/peer/conn.go +++ b/client/internal/peer/conn.go @@ -458,7 +458,7 @@ func (conn *Conn) onWorkerICEStateDisconnected(newState ConnStatus) { conn.log.Tracef("ICE connection state changed to %s", newState) // switch back to relay connection - if conn.endpointRelay != nil { + if conn.endpointRelay != nil && conn.currentConnPriority != connPriorityRelay { conn.log.Debugf("ICE disconnected, set Relay to active connection") err := conn.configureWGEndpoint(conn.endpointRelay) if err != nil {