panlili2024
2025-02-21 d31f2155237aa65cee1cb6ce1d39c48191663226
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() {
@@ -35,7 +32,7 @@
        mUdpClientPool.clear();
    }
    public synchronized DatagramSocket getUdpSocket1(InetSocketAddress address) throws SocketException {
    public synchronized DatagramSocket getUdpSocket(InetSocketAddress address) throws SocketException {
        DatagramSocket socket;
        final String key = address.toString();
        if (mUdpClientPool.containsKey(key)) {