mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 13:23:06 +02:00
Merge pull request #16044 from SimonWalton-HiFi/count-dropped-packets
BUGZ-1161: Report count of dropped packets in Socket::checkForReadyReadBackup()
This commit is contained in:
commit
29cc7e848e
3 changed files with 9 additions and 4 deletions
|
@ -75,7 +75,7 @@ public:
|
|||
void each(std::function<void(AvatarMixerSlave& slave)> functor);
|
||||
|
||||
#ifdef DEBUG_EVENT_QUEUE
|
||||
void AvatarMixerSlavePool::queueStats(QJsonObject& stats);
|
||||
void queueStats(QJsonObject& stats);
|
||||
#endif
|
||||
|
||||
void setNumThreads(int numThreads);
|
||||
|
|
|
@ -334,12 +334,17 @@ void Socket::checkForReadyReadBackup() {
|
|||
qCDebug(networking) << "Socket::checkForReadyReadyBackup() last sequence number"
|
||||
<< (uint32_t) _lastReceivedSequenceNumber << "from" << _lastPacketSockAddr << "-"
|
||||
<< _lastPacketSizeRead << "bytes";
|
||||
|
||||
#ifdef DEBUG_EVENT_QUEUE
|
||||
qCDebug(networking) << "NodeList event queue size:" << ::hifi::qt::getEventQueueSize(thread());
|
||||
#endif
|
||||
|
||||
// drop all of the pending datagrams on the floor
|
||||
int droppedCount = 0;
|
||||
while (_udpSocket.hasPendingDatagrams()) {
|
||||
_udpSocket.readDatagram(nullptr, 0);
|
||||
++droppedCount;
|
||||
}
|
||||
qCDebug(networking) << "Flushed" << droppedCount << "Packets";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_LINUX)
|
||||
// Enable event queue debugging
|
||||
#define DEBUG_EVENT_QUEUE
|
||||
#endif // WIN32
|
||||
#endif
|
||||
|
||||
namespace hifi { namespace qt {
|
||||
void addBlockingForbiddenThread(const QString& name, QThread* thread = nullptr);
|
||||
|
|
Loading…
Reference in a new issue