This is an automated email from the ASF dual-hosted git repository. aloyszhang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push: new 099e2c40ab [INLONG-11442][Audit] Optimize the exception log of Audit SDK (#11443) 099e2c40ab is described below commit 099e2c40abcda65b17b81e8b95a3d7cbcc4c59ab Author: doleyzi <43397300+dole...@users.noreply.github.com> AuthorDate: Thu Oct 31 19:41:33 2024 +0800 [INLONG-11442][Audit] Optimize the exception log of Audit SDK (#11443) --- .../src/main/java/org/apache/inlong/audit/send/SenderManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/send/SenderManager.java b/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/send/SenderManager.java index b795b7aa98..97f2baf33c 100644 --- a/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/send/SenderManager.java +++ b/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/send/SenderManager.java @@ -77,15 +77,16 @@ public class SenderManager { public boolean checkSocket() { if (socket.isClosed() || !socket.isConnected()) { + InetSocketAddress inetSocketAddress = null; try { - InetSocketAddress inetSocketAddress = ProxyManager.getInstance().getInetSocketAddress(); + inetSocketAddress = ProxyManager.getInstance().getInetSocketAddress(); if (inetSocketAddress == null) { LOGGER.error("Audit proxy address is null!"); return false; } reconnect(inetSocketAddress, auditConfig.getSocketTimeout()); } catch (IOException exception) { - LOGGER.error("Connect to audit proxy {} has exception!", socket.getInetAddress(), exception); + LOGGER.error("Connect to audit proxy {} has exception!", inetSocketAddress, exception); return false; } }