void CRoutingZone::OnSmallTimer()
{
    if (!IsLeaf()) {
        return;
    }

    CContact *c = NULL;
    time_t now = time(NULL);
    ContactList entries;

    // Remove dead entries
    m_bin->GetEntries(&entries);
    for (ContactList::iterator it = entries.begin(); it != entries.end(); ++it) {
        c = *it;
        if (c->GetType() == 4) {
            if ((c->GetExpireTime() > 0) && (c->GetExpireTime() <= now)) {
                if (!c->InUse()) {
                    m_bin->RemoveContact(c);
                    delete c;
                }
                continue;
            }
        }
        if(c->GetExpireTime() == 0) {
            c->SetExpireTime(now);
        }
    }

    c = m_bin->GetOldest();
    if (c != NULL) {
        if (c->GetExpireTime() >= now || c->GetType() == 4) {
            m_bin->PushToBottom(c);
            c = NULL;
        }
    }

    if (c != NULL) {
        c->CheckingType();
        if (c->GetVersion() >= 6) {
            DebugSend(L"Kad2HelloReq", c->GetIPAddress(), c->GetUDPPort());
            CUInt128 clientID = c->GetClientID();
            CKademlia::GetUDPListener()->SendMyDetails(KADEMLIA2_HELLO_REQ, c->GetIPAddress(), c->GetUDPPort(), c->GetVersion(), c->GetUDPKey(), &clientID, false);
            if (c->GetVersion() >= 8) {
                // FIXME:
                // This is a bit of a work around for statistic values. Normally we only count values from incoming HELLO_REQs for
                // the firewalled statistics in order to get numbers from nodes which have us on their routing table,
                // however if we send a HELLO due to the timer, the remote node won't send a HELLO_REQ itself anymore (but
                // a HELLO_RES which we don't count), so count those statistics here. This isn't really accurate, but it should
                // do fair enough. Maybe improve it later for example by putting a flag into the contact and make the answer count
                CKademlia::GetPrefs()->StatsIncUDPFirewalledNodes(false);
                CKademlia::GetPrefs()->StatsIncTCPFirewalledNodes(false);
            }
        } else if (c->GetVersion() >= 2) {
            DebugSend(L"Kad2HelloReq", c->GetIPAddress(), c->GetUDPPort());
            CKademlia::GetUDPListener()->SendMyDetails(KADEMLIA2_HELLO_REQ, c->GetIPAddress(), c->GetUDPPort(), c->GetVersion(), 0, NULL, false);
            ASSERT(c->GetUDPKey() == CKadUDPKey(0));
        } else {
            ASSERT(0);
        }
    }
}