From 7fbda64843598e52ff187c1977fd63eef8f39ed4 Mon Sep 17 00:00:00 2001 From: Judge_Zhang Date: Tue, 15 Aug 2023 22:23:12 +0800 Subject: [PATCH 1/2] Update server_connection_manager.c Resolve the problem that you cannot connect to the cat server correctly when the http-port and port configurations in the configuration are inconsistent --- lib/c/src/ccat/server_connection_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/c/src/ccat/server_connection_manager.c b/lib/c/src/ccat/server_connection_manager.c index 1781bd71cd..53df012e4d 100644 --- a/lib/c/src/ccat/server_connection_manager.c +++ b/lib/c/src/ccat/server_connection_manager.c @@ -383,7 +383,7 @@ int updateCatServerConn() { if (isFirstConnect) { rst = getRouterFromServer(g_config.serverHost, g_config.serverPort, g_cat_messageManager.domain); } else { - rst = getRouterFromServer(g_cat_send_ip, g_config.serverPort, g_cat_messageManager.domain); + rst = getRouterFromServer(g_cat_send_ip, g_cat_send_port, g_cat_messageManager.domain); } INNER_LOG(CLOG_DEBUG, "Get router from server successfully"); From 36d6530b480295529f8cc22f31f7b49cba61bbdc Mon Sep 17 00:00:00 2001 From: Judge_Zhang Date: Tue, 22 Aug 2023 20:15:29 +0800 Subject: [PATCH 2/2] Update server_connection_manager.c --- lib/c/src/ccat/server_connection_manager.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/c/src/ccat/server_connection_manager.c b/lib/c/src/ccat/server_connection_manager.c index 53df012e4d..5c784c9d59 100644 --- a/lib/c/src/ccat/server_connection_manager.c +++ b/lib/c/src/ccat/server_connection_manager.c @@ -380,11 +380,8 @@ int updateCatServerConn() { CATCS_ENTER(g_server_lock); int rst; - if (isFirstConnect) { - rst = getRouterFromServer(g_config.serverHost, g_config.serverPort, g_cat_messageManager.domain); - } else { - rst = getRouterFromServer(g_cat_send_ip, g_cat_send_port, g_cat_messageManager.domain); - } + rst = getRouterFromServer(g_config.serverHost, g_config.serverPort, g_cat_messageManager.domain); + INNER_LOG(CLOG_DEBUG, "Get router from server successfully"); if (isFirstConnect || rst > 0) {