From 35bc3515649192bd98a12f4b80aa591e283aefed Mon Sep 17 00:00:00 2001 From: Sergei Maklagin Date: Mon, 2 Mar 2026 19:48:06 +0300 Subject: [PATCH] Fix failover --- protocol/group/failover.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protocol/group/failover.go b/protocol/group/failover.go index 55ff0082..c0362163 100644 --- a/protocol/group/failover.go +++ b/protocol/group/failover.go @@ -100,6 +100,9 @@ func (s *Failover) ListenPacket(ctx context.Context, destination M.Socksaddr) (n s.logger.ErrorContext(ctx, err) continue } + s.mtx.Lock() + defer s.mtx.Unlock() + s.lastUsedOutbound = outbound.Tag() return conn, nil } return nil, err