diff --git a/arangod/GeneralServer/SocketTask.cpp b/arangod/GeneralServer/SocketTask.cpp index bf803a4e66..63dbd66eca 100644 --- a/arangod/GeneralServer/SocketTask.cpp +++ b/arangod/GeneralServer/SocketTask.cpp @@ -246,9 +246,9 @@ void SocketTask::resetKeepAlive() { std::weak_ptr self = shared_from_this(); _keepAliveTimer->async_wait([self](const asio_ns::error_code& ec) { if (!ec) { // error will be true if timer was canceled - LOG_TOPIC("f0948", INFO, Logger::COMMUNICATION) - << "keep alive timout - closing stream!"; if (auto s = self.lock()) { + LOG_TOPIC("f0948", INFO, Logger::COMMUNICATION) + << "keep alive timeout - closing stream!"; s->closeStream(); } } diff --git a/arangod/Scheduler/SupervisedScheduler.cpp b/arangod/Scheduler/SupervisedScheduler.cpp index 4dcaba0e40..ef0990fdc2 100644 --- a/arangod/Scheduler/SupervisedScheduler.cpp +++ b/arangod/Scheduler/SupervisedScheduler.cpp @@ -71,7 +71,7 @@ namespace { thread_local time_point conditionQueueFullSince{}; thread_local uint_fast32_t queueWarningTick{}; - time_point lastWarningQueue; + time_point lastWarningQueue = std::chrono::steady_clock::now(); int64_t queueWarningEvents = 0; std::mutex queueWarningMutex; @@ -79,9 +79,8 @@ namespace { int64_t fullQueueEvents[3] = {0, 0, 0}; std::mutex fullQueueWarningMutex[3]; - void logQueueWarningEveryNowAndThen(int64_t events) { - auto const& now = std::chrono::steady_clock::now(); + auto const now = std::chrono::steady_clock::now(); uint64_t totalEvents; bool printLog = false; std::chrono::duration sinceLast;