public synchronized void destroy() {
        // LOG.log(Level.WARNING, "XMPPSenderInternal: destroy");

        Vector<InternalHTTPConnection<InternalHTTPResponse>> connectionsToDestroy;
        synchronized(this) {
            if(cfg == null)
                return;

            connectionsToDestroy = connections;
            connections = null;
        }

        for(InternalHTTPConnection<InternalHTTPResponse> connection: connectionsToDestroy) {
            // LOG.log(Level.WARNING, "XMPPSenderInternal: destroy: aborting a connection");
            connection.abort();
        }
        cfg = null;
    }