avoid thread-unsafe socket errorString call

This commit is contained in:
Stephen Birarda 2018-07-24 11:51:13 -07:00
parent b29044fd7e
commit 8224492d72

View file

@ -229,7 +229,7 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc
if (bytesWritten < 0) { if (bytesWritten < 0) {
// when saturating a link this isn't an uncommon message - suppress it so it doesn't bomb the debug // when saturating a link this isn't an uncommon message - suppress it so it doesn't bomb the debug
HIFI_FCDEBUG(networking(), "Socket::writeDatagram" << _udpSocket.error() << "-" << qPrintable(_udpSocket.errorString()) ); HIFI_FCDEBUG(networking(), "Socket::writeDatagram" << _udpSocket.error());
} }
return bytesWritten; return bytesWritten;
@ -513,7 +513,7 @@ std::vector<HifiSockAddr> Socket::getConnectionSockAddrs() {
} }
void Socket::handleSocketError(QAbstractSocket::SocketError socketError) { void Socket::handleSocketError(QAbstractSocket::SocketError socketError) {
HIFI_FCDEBUG(networking(), "udt::Socket error - " << socketError << _udpSocket.errorString()); HIFI_FCDEBUG(networking(), "udt::Socket error - " << socketError);
} }
void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) { void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) {