fixed incorrect mutex unlock in Node::getAgentConnection
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 2 Nov 2017 18:14:14 +0000 (20:14 +0200)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 2 Nov 2017 18:14:14 +0000 (20:14 +0200)
src/server/core/node.cpp

index d51301b..350c670 100644 (file)
@@ -5407,11 +5407,11 @@ AgentConnectionEx *Node::getAgentConnection()
             conn = m_agentConnection;
             conn->incRefCount();
          }
+         MutexUnlock(m_hAgentAccessMutex);
          break;
       }
       ThreadSleepMs(50);
    }
-   MutexUnlock(m_hAgentAccessMutex);
 
    if (!success)
    {