@Override
        public void run()
        {
            occupant.setPendingPingTask(null);

            Log.trace("Checking if {} has responded to a ping request that we sent earlier (with stanza ID '{}').", occupant, stanzaID);
            if (!occupant.getRealJID().equals(PINGS_SENT.remove(stanzaID)))  // A null-check should be enough. Check against recipient for extra safety.
            {
                Log.trace("The ping request that we sent earlier to {} seems to have been answered. No need to remove this occupant.", occupant);
                return;
            }

            final Instant lastActivity = occupantManager.lastActivityOnLocalNode(occupant.getRealJID());
            if (lastActivity == null) {
                // If the occupant is in the room, it likely reconnected to another cluster node. Have that node worry about ghost detection.
                Log.debug("{} that has been sent a ping request earlier is no longer connected to the local cluster node. No need to remove this occupant.", occupant);
                return;
            }

            if (lastActivity.isAfter(pingRequestSent)) {
                Log.debug("{} has not responded to a ping request that we sent earlier, but has had other activity. No need to remove this occupant.", occupant);
                return;
            }

            Log.debug("{} has not responded to a ping request that we sent earlier and didn't have other activity. Occupant should be kicked from the room.", occupant);
            tryRemoveOccupantFromRoom(occupant, JiveGlobals.getProperty("admin.mucRoom.noPingResponseKickReason", "User seems to be unreachable (didn't respond to a ping request).") );
        }
A task that verifies if a response to a certain IQ Ping stanza (identified by stanza ID) was received, kicking
an occupant of a MUC room if it is not, and if there hasn't been any other activity from the occupant since.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java