MaxIdleTime is not changeable for websocket connections in openfire

Hi,

I have installed websocket plugin of openfire. Now when on sparkweb side(client side) if a user’s networks goes off then on openfire we can still see its presence for 5 minutes after which its presence is offline. When i saw the websocket plugin war file then it uses a xmppservlet which extends websocketServlet . In websocketServlet maxIdleTime is set which websocketServlet gets from int param but i dont see this init param’s entry anywhere in any web.xml file

Below is the code snippet of websocketServlet where in init function maxidleTime is set:-

But i dont see the default 5 minutes entry of maxIdleTime in any web.xml

@Override

public void init() throws ServletException

{

try

{

String bs = getInitParameter(“bufferSize”);

_webSocketFactory = new WebSocketFactory(this, bs == null ? 8192 : Integer.parseInt(bs));

_webSocketFactory.start();

String max = getInitParameter(“maxIdleTime”);

if (max != null)

_webSocketFactory.setMaxIdleTime(Integer.parseInt(max));

max = getInitParameter(“maxTextMessageSize”);

if (max != null)

_webSocketFactory.setMaxTextMessageSize(Integer.parseInt(max));

max = getInitParameter(“maxBinaryMessageSize”);

if (max != null)

_webSocketFactory.setMaxBinaryMessageSize(Integer.parseInt(max));

String min = getInitParameter(“minVersion”);

if (min != null)

_webSocketFactory.setMinVersion(Integer.parseInt(min));

}

catch (ServletException x)

{

throw x;

}

catch (Exception x)

{

throw new ServletException(x);

}

}

Does anybody has any idea how to set maxIdleTime ??