Debug output for ping timeout issues.
authorMarcus Eggenberger <egs@quassel-irc.org>
Mon, 16 Mar 2009 12:24:32 +0000 (13:24 +0100)
committerMarcus Eggenberger <egs@quassel-irc.org>
Mon, 16 Mar 2009 12:25:02 +0000 (13:25 +0100)
If you experience ping timeout issues, please start your core with
--loglevel=Debug option to enable debug output.

src/core/corenetwork.cpp

index 5fd5ed9..89afa2c 100644 (file)
@@ -525,6 +525,10 @@ void CoreNetwork::doAutoReconnect() {
 
 void CoreNetwork::sendPing() {
   uint now = QDateTime::currentDateTime().toTime_t();
+  if(_pingCount != 0) {
+    qDebug() << "UserId:" << userId() << "Network:" << networkName() << "missed" << _pingCount << "pings."
+            << "BA:" << socket.bytesAvailable() << "BTW:" << socket.bytesToWrite();
+  }
   if(_pingCount >= _maxPingCount && now - _lastPingTime <= (uint)(_pingTimer.interval() / 1000) + 1) {
     // the second check compares the actual elapsed time since the last ping and the pingTimer interval
     // if the interval is shorter then the actual elapsed time it means that this thread was somehow blocked