diff --git a/src/ripple/overlay/impl/OverlayImpl.cpp b/src/ripple/overlay/impl/OverlayImpl.cpp index 409d687cd50..13721b62c35 100644 --- a/src/ripple/overlay/impl/OverlayImpl.cpp +++ b/src/ripple/overlay/impl/OverlayImpl.cpp @@ -100,7 +100,7 @@ OverlayImpl::Timer::on_timer(error_code ec) overlay_.sendEndpoints(); overlay_.autoConnect(); - if ((overlay_.timer_count_ % Tuning::checkIdlePeers) == 0) + if ((++overlay_.timer_count_ % Tuning::checkIdlePeers) == 0) overlay_.deleteIdlePeers(); timer_.expires_from_now(std::chrono::seconds(1));