fix suppression of link saturation messages

This commit is contained in:
Stephen Birarda 2015-08-04 16:29:53 -07:00
parent 23e1ee71cc
commit 7b8ca2c0f2
3 changed files with 5 additions and 3 deletions

View file

@ -114,11 +114,11 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc
if (bytesWritten < 0) {
// when saturating a link this isn't an uncommon message - suppress it so it doesn't bomb the debug
static const QString WRITE_ERROR_REGEX = "writeDatagram error: QAbstractSocket::NetworkError - Unable to send a message";
static const QString WRITE_ERROR_REGEX = "Socket::writeDatagram QAbstractSocket::NetworkError - Unable to send a message";
static QString repeatedMessage
= LogHandler::getInstance().addRepeatedMessageRegex(WRITE_ERROR_REGEX);
qCDebug(networking) << "writeDatagram error:" << _udpSocket.error() << "-" << qPrintable(_udpSocket.errorString());
qCDebug(networking) << "Socket::writeDatagram" << _udpSocket.error() << "-" << qPrintable(_udpSocket.errorString());
}
return bytesWritten;

View file

@ -1,6 +1,6 @@
set(TARGET_NAME udt-test)
setup_hifi_project()
link_hifi_libraries(networking)
link_hifi_libraries(networking shared)
copy_dlls_beside_windows_executable()

View file

@ -16,6 +16,8 @@
#include <udt/Constants.h>
#include <udt/Packet.h>
#include <LogHandler.h>
const QCommandLineOption PORT_OPTION { "p", "listening port for socket (defaults to random)", "port", 0 };
const QCommandLineOption TARGET_OPTION {
"target", "target for sent packets (default is listen only)",