diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b03df3a1cc..e19ce68d39 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3820,10 +3820,11 @@ void Application::domainChanged(const QString& domainHostname) { } void Application::handleDomainConnectionDeniedPacket(QSharedPointer packet) { - QDataStream packetStream(packet.data()); - - QString reason; - packetStream >> reason; + // Read deny reason from packet + quint16 reasonSize; + packet->readPrimitive(&reasonSize); + QString reason = QString::fromUtf8(packet->getPayload() + packet->pos(), reasonSize); + packet->seek(packet->pos() + reasonSize); // output to the log so the user knows they got a denied connection request // and check and signal for an access token so that we can make sure they are logged in