Browse Source

Z991239-6440 #comment feat: 心跳实体连接主备模式功能改造

Signed-Off-By: commit-hook
刘文涛80174520 1 month ago
parent
commit
044cfa9678
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Framework/spbase/SpSecureClient.cpp

+ 2 - 2
Framework/spbase/SpSecureClient.cpp

@@ -586,7 +586,7 @@ bool SpSecureClient::Connect_Standby(CSimpleStringA mainServ, CAutoArray<CSimple
 		}
 		else {
 			if (Connect(strServer1, nServer1Port, option)) {
-				connectInfo.setParam(pEntityName, strServer1.GetData(), nServer1Port, "", -1, 0, 0);//主机连接上
+				connectInfo.setParam(pEntityName, strServer1.GetData(), nServer1Port, "", 0, -1, 0);//主机连接上
 				setConnectInfo(&connectInfo);
 				DbgWithLink_DualActive("Standby Connection: EntityName:%s, server:%s %d, serverBackup:%s %d, DualOpen: %d, currentLink:%d", connectInfo.m_EntityName, connectInfo.m_ServerIP,
 					connectInfo.m_ServerPort, connectInfo.m_Server_BackupIP, connectInfo.m_Server_BackupPort, connectInfo.m_DualActive, connectInfo.m_currentLink);
@@ -609,7 +609,7 @@ bool SpSecureClient::Connect_Standby(CSimpleStringA mainServ, CAutoArray<CSimple
 			}
 			else {
 				if (Connect(strServer2, nServer2Port, option)) {
-					connectInfo.setParam(pEntityName, "", -1, strServer2.GetData(), nServer2Port, 0, 1);//备机连接上
+					connectInfo.setParam(pEntityName, strServer1.GetData(), nServer1Port, strServer2.GetData(), nServer2Port, -1, 1);//备机连接上
 					setConnectInfo(&connectInfo);
 					DbgWithLink_DualActive("Standby Connection: EntityName:%s, server:%s %d, serverBackup:%s %d, DualOpen: %d, currentLink:%d", connectInfo.m_EntityName, connectInfo.m_ServerIP,
 						connectInfo.m_ServerPort, connectInfo.m_Server_BackupIP, connectInfo.m_Server_BackupPort, connectInfo.m_DualActive, connectInfo.m_currentLink);