From 941875a7b24f51b8dba4993553683a84c5651392 Mon Sep 17 00:00:00 2001 From: Shi Su <67605788+shi-su@users.noreply.github.com> Date: Mon, 22 Mar 2021 11:08:30 -0700 Subject: [PATCH] Deactivate mirror session only when session status is true in updateLagMember (#1666) Deactivate mirror session only when the status is true in updateLagMember --- orchagent/mirrororch.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/orchagent/mirrororch.cpp b/orchagent/mirrororch.cpp index 2455c5bff0..f62a1cf256 100644 --- a/orchagent/mirrororch.cpp +++ b/orchagent/mirrororch.cpp @@ -1370,7 +1370,10 @@ void MirrorOrch::updateLagMember(const LagMemberUpdate& update) // If LAG is empty, deactivate session if (update.lag.m_members.empty()) { - deactivateSession(name, session); + if (session.status) + { + deactivateSession(name, session); + } session.neighborInfo.portId = SAI_OBJECT_TYPE_NULL; } // Switch to a new member of the LAG