public synchronized void closeSocket(Node node) {
        if (mConnectionMap != null && mConnectionMap.containsKey(node)) {
            Socket socket = mConnectionMap.get(node);
            if (socket != null) {
                try {
                    socket.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            mConnectionMap.remove(node);
        }
    }