fix(QAmqpClient): enable autoReconnect after forced disconnect

This commit is contained in:
Matt Broadstone 2015-11-19 17:09:56 -05:00
parent c113611b05
commit c025333204
1 changed files with 7 additions and 1 deletions

View File

@ -477,7 +477,13 @@ void QAmqpClientPrivate::close(const QAmqpMethodFrame &frame)
// if it was a force disconnect, simulate receiving a closeOk
if (checkError == QAMQP::ConnectionForcedError) {
return closeOk(QAmqpMethodFrame());
closeOk(QAmqpMethodFrame());
if (autoReconnect) {
qAmqpDebug() << "trying to reconnect after: " << timeout << "ms";
QTimer::singleShot(timeout, q, SLOT(_q_connect()));
}
return;
}
}