fix a crash when an async reply comes in but the transpost has vanished meanwhile
This commit is contained in:
parent
038b5036e3
commit
01110ad0ba
@ -531,6 +531,11 @@ void JsonRPCServer::asyncReplyFinished()
|
|||||||
{
|
{
|
||||||
JsonReply *reply = qobject_cast<JsonReply *>(sender());
|
JsonReply *reply = qobject_cast<JsonReply *>(sender());
|
||||||
TransportInterface *interface = m_asyncReplies.take(reply);
|
TransportInterface *interface = m_asyncReplies.take(reply);
|
||||||
|
if (!interface) {
|
||||||
|
qCWarning(dcJsonRpc()) << "Got an async reply but the requesting connection has vanished.";
|
||||||
|
reply->deleteLater();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!reply->timedOut()) {
|
if (!reply->timedOut()) {
|
||||||
Q_ASSERT_X(reply->handler()->validateReturns(reply->method(), reply->data()).first
|
Q_ASSERT_X(reply->handler()->validateReturns(reply->method(), reply->data()).first
|
||||||
,"validating return value", formatAssertion(reply->handler()->name(), reply->method(), reply->handler(), reply->data()).toLatin1().data());
|
,"validating return value", formatAssertion(reply->handler()->name(), reply->method(), reply->handler(), reply->data()).toLatin1().data());
|
||||||
|
|||||||
Reference in New Issue
Block a user