public void sessionIdle(IoSession session, IdleStatus status) throws Exception {
super.sessionIdle(session, status);
final boolean doPing = JiveGlobals.getBooleanProperty("xmpp.client.idle.ping", true);
if (doPing && session.getIdleCount(status) == 1) {
final ClientStanzaHandler handler = (ClientStanzaHandler) session.getAttribute(HANDLER);
final JID entity = handler.getAddress();
if (entity != null) {
// Ping the connection to see if it is alive.
final IQ pingRequest = new IQ(Type.get);
pingRequest.setChildElement("ping",