mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-01 20:41:28 +02:00
Fall back to activity monitoring when an active re-add fails to open
This commit is contained in:
@@ -233,7 +233,10 @@ func (e *ConnMgr) AddPeerConn(ctx context.Context, peerKey string, conn *peer.Co
|
||||
|
||||
if active {
|
||||
conn.Log.Infof("peer added to lazy conn manager as active")
|
||||
e.openConn(ctx, conn)
|
||||
if err := conn.Open(ctx); err != nil {
|
||||
conn.Log.Errorf("failed to open connection, falling back to activity monitoring: %v", err)
|
||||
e.lazyConnMgr.DeactivatePeer(conn.ConnID())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user