MultiUserChat.setSubject() times out

I am using Openfire 3.5.2 and Smack 3.0.4.

I am attempting to create a persistent MUC and if it exists (i.e. throws Exception) continue on to set the subject on the MUC.

The server has no load - as it runs on my desktop for development. I did change the packet reply timeout to 10000 and even 25000 milliseconds. Still, on 9 out 10 requests to setSubject(), the request times out and I receive a “No response from server” message in the Exception that is thrown on the timeout.

The creator of the MUC is the user who is changing the subject. The subject change occurrs after joining the MUC. Even without joining it the subject change times out.

Code:

MultiUserChat muc =
new MultiUserChat(xmppConnection, roomName);
try
{
logger.debug("Creating room " + roomName);
muc.create(adminNickname);

    }
    catch(XMPPException xmppe)
    {
        // the room already exists. Rejoin it.
        logger.debug("Room already exists?" + xmppe.getMessage());           
    }
   
    if(!muc.isJoined())
    {
        logger.debug("Admin joining room " + roomName);
        muc.join(roomName);               
    }

Form form = muc.getConfigurationForm();
Form submitForm = form.createAnswerForm();
for (Iterator fields = form.getFields(); fields.hasNext():wink: {
FormField field = (FormField) fields.next();
if (!FormField.TYPE_HIDDEN.equals(field.getType()) && field.getVariable() != null) {
// Sets the default value as the answer
submitForm.setDefaultAnswer(field.getVariable());
}
}

submitForm.setAnswer(“muc#roomconfig_persistentroom”, true);

    muc.sendConfigurationForm(submitForm);

    if(subject != null)
    {
        muc.changeSubject(subject);
        logger.debug("Changed room subject to " + subject);
    }