diff --git a/assignment-client/src/avatars/AvatarMixerSlavePool.h b/assignment-client/src/avatars/AvatarMixerSlavePool.h index c8f4c252b1..915c6d8dc4 100644 --- a/assignment-client/src/avatars/AvatarMixerSlavePool.h +++ b/assignment-client/src/avatars/AvatarMixerSlavePool.h @@ -75,7 +75,7 @@ public: void each(std::function functor); #ifdef DEBUG_EVENT_QUEUE - void AvatarMixerSlavePool::queueStats(QJsonObject& stats); + void queueStats(QJsonObject& stats); #endif void setNumThreads(int numThreads); diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 4714160ace..c25075171b 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -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"; } } diff --git a/libraries/shared/src/shared/QtHelpers.h b/libraries/shared/src/shared/QtHelpers.h index cde6ecdbb7..f57ba4af2d 100644 --- a/libraries/shared/src/shared/QtHelpers.h +++ b/libraries/shared/src/shared/QtHelpers.h @@ -12,10 +12,10 @@ #include -#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);