provide access to QAbstractSocket error string on error

When a socket error occurs the string version of the error is now
stored in QAmqpClient's internal errorString variable, providing
access to the string to users of the client.
This commit is contained in:
Matt Broadstone 2015-02-05 10:40:59 -05:00
parent f5736a9615
commit bcc6fdba9d
1 changed files with 1 additions and 0 deletions

View File

@ -189,6 +189,7 @@ void QAmqpClientPrivate::_q_socketError(QAbstractSocket::SocketError error)
// per spec, on any error we need to close the socket immediately
// and send no more data;
socket->close();
errorString = socket->errorString();
if (autoReconnect) {
qAmqpDebug() << "trying to reconnect after: " << timeout << "ms";