private long getDefaultEmptyRequestDelay() {
        assertLocked();
        
        // If we havn't yet received the session creation response, never send empty
        // requests.
        if(cmParams == null)
            return -1;

        // If empty requests are disabled, don't send them.  This is only used for testing.
        if(cmParams.emptyRequestsDisabled())
            return -1;

        // When not polling, we're under section XEP-0124 sec11, not sec12.  Empty requests
        // will never result in reaching the 'requests' value.  Send the next empty request
        // immediately.
        if(cmParams.getHold().getValue() > 0)
            return 0;

        // Figure out how long we should wait before sending an empty request
        AttrPolling polling = cmParams.getPollingInterval();
        long delay;
        if (polling == null) {
            delay = EMPTY_REQUEST_DELAY;
        } else {
            delay = polling.getInMilliseconds();
        }
        return delay;
    }