fix for als2019 8.0.0
[apps/agl-service-windowmanager.git] / src / wm_connection.cpp
index 16bb2d6..3600cd4 100644 (file)
@@ -557,7 +557,7 @@ int WMConnection::connectToEcu()
         std::string ecu_name = itr->first;
         HMI_DEBUG("ECU Names %s", ecu_name.c_str());
 
-        if (itr->second.connectedSocket() != -1 || !itr->second.masterMode())
+        if (itr->second.connectedSocket() != -1 || itr->first == this->ecu_name)
         {
             cnt++;
             HMI_DEBUG("Already Connected");
@@ -569,6 +569,9 @@ int WMConnection::connectToEcu()
             HMI_DEBUG("Try Connection");
             connectToServer(ecu_name);
         }
+
+        HMI_DEBUG("Wait Connection");
+
     }
 
     if (cnt == (int)this->wm_socket.size())