From 512b43e1de99f113a8b5ec8ee59bf0e4f6be8236 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Tue, 4 Jun 2019 15:18:38 -0700 Subject: [PATCH] Log socket error string when socket error happens --- libraries/networking/src/udt/Socket.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 524f7edf72..5e68070bb7 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -486,7 +486,11 @@ std::vector Socket::getConnectionSockAddrs() { } void Socket::handleSocketError(QAbstractSocket::SocketError socketError) { - qCDebug(networking) << "udt::Socket error - " << socketError; + qCDebug(networking) << "udt::Socket (" << _udpSocket.state() << ") error - " << socketError << "(" << _udpSocket.errorString() << ")"; +#ifdef DEBUG_EVENT_QUEUE + int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread()); + qCDebug(networking) << "Networking queue size - " << nodeListQueueSize; +#endif // DEBUG_EVENT_QUEUE } void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) {