diff --git a/libtransport/NetworkPluginServer.cpp b/libtransport/NetworkPluginServer.cpp index ee72c3e11eb3826b71d32ffe4f86c4cfae07aae2..2bec00a2182c8ec0bd1675d8bf196d402a8d789c 100644 --- a/libtransport/NetworkPluginServer.cpp +++ b/libtransport/NetworkPluginServer.cpp @@ -1305,6 +1305,7 @@ void NetworkPluginServer::send(boost::shared_ptr &c, const st } void NetworkPluginServer::pingTimeout() { + LOG4CXX_INFO(logger, "Sending PING to backends"); // TODO: move to separate timer, those 2 loops could be expensive // Some users are connected for weeks and they are blocking backend to be destroyed and its memory // to be freed. We are finding users who are inactive for more than "idle_reconnect_time" seconds and @@ -1350,6 +1351,9 @@ void NetworkPluginServer::pingTimeout() { if ((*it)->pongReceived) { sendPing((*it)); } + else { + LOG4CXX_INFO(logger, "Tried to send PING to backend without pongReceived= " << (*it)->pongReceived << ": (ID=" << (*it)->id << ")"); + } } else { LOG4CXX_INFO(logger, "Disconnecting backend " << (*it) << " (ID=" << (*it)->id << "). PING response not received."); @@ -1966,6 +1970,9 @@ void NetworkPluginServer::sendPing(Backend *c) { send(c->connection, message); c->pongReceived = false; } + else { + LOG4CXX_WARN(logger, "Tried to send PING to backend without connection: " << c << " (ID=" << c->id << ")"); + } // LOG4CXX_INFO(logger, "PING to " << c); }