mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-17 15:56:39 +00:00
Prevent double start the guard code
This commit is contained in:
@@ -807,7 +807,12 @@ func (conn *Conn) rosenpassDetermKey() (*wgtypes.Key, error) {
|
||||
}
|
||||
|
||||
func (conn *Conn) switchGuard() {
|
||||
if conn.guardCtxCancel == nil {
|
||||
return
|
||||
}
|
||||
|
||||
conn.guardCtxCancel()
|
||||
conn.guardCtxCancel = nil
|
||||
conn.wgGuard.Wait()
|
||||
conn.wg.Add(1)
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user