From db29d92c6974d50f0ebb9328834c44a69c6054bb Mon Sep 17 00:00:00 2001 From: panlili2024 <14743743+panlili2024@user.noreply.gitee.com> Date: 星期三, 05 三月 2025 15:28:37 +0800 Subject: [PATCH] 更新版本 --- HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/SocketPool.java | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/SocketPool.java b/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/SocketPool.java index 5913d46..41e2763 100644 --- a/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/SocketPool.java +++ b/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/SocketPool.java @@ -21,13 +21,10 @@ mUdpClientPool = new ConcurrentHashMap<>(); } - - private static class SingletonInstance { - private static final SocketPool INSTANCE = new SocketPool(); - } + private static final SocketPool instance = new SocketPool(); public static SocketPool getInstance() { - return SingletonInstance.INSTANCE; + return instance; } public void clear() { @@ -51,5 +48,4 @@ mUdpClientPool.put(address.toString(), socket); return socket; } - } -- Gitblit v1.8.0