#vulnerable code 
                                protected void handleDisconnect(IoSession session, DisconnectMessage disconnectMessage) {
        String clientID = (String) session.getAttribute(ATTR_CLIENTID);
        //remove from clientIDs
        m_clientIDsLock.lock();
        try {
            m_clientIDs.remove(clientID);
        } finally {
            m_clientIDsLock.unlock();
        }
        boolean cleanSession = (Boolean) session.getAttribute("cleanSession");
        if (cleanSession) {
            //cleanup topic subscriptions
            m_messaging.removeSubscriptions(clientID);
        }
        
        //close the TCP connection
        session.close(true);
    } 
                            #location 13 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                protected void handleDisconnect(IoSession session, DisconnectMessage disconnectMessage) {
        String clientID = (String) session.getAttribute(ATTR_CLIENTID);
        //remove from clientIDs
//        m_clientIDsLock.lock();
//        try {
//            m_clientIDs.remove(clientID);
//        } finally {
//            m_clientIDsLock.unlock();
//        }
        boolean cleanSession = (Boolean) session.getAttribute("cleanSession");
        if (cleanSession) {
            //cleanup topic subscriptions
            m_messaging.removeSubscriptions(clientID);
        }
        
        //close the TCP connection
        //session.close(true);
        m_messaging.disconnect(session);
    }