mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Fix clearing callbacks for timeout-ed requests.
This commit is contained in:
parent
be043a4437
commit
091d1157da
@ -2322,7 +2322,7 @@ void ConnectionPrivate::requestsAcked(const QVector<MTPlong> &ids, bool byRespon
|
||||
while (ackedCount-- > MTPIdsBufferSize) {
|
||||
auto i = wereAcked.begin();
|
||||
clearedBecauseTooOld.push_back(RPCCallbackClear(
|
||||
i.key(),
|
||||
i.value(),
|
||||
RPCError::TimeoutError));
|
||||
wereAcked.erase(i);
|
||||
}
|
||||
|
@ -941,6 +941,10 @@ void Instance::Private::clearCallbacks(mtpRequestId requestId, int32 errorCode)
|
||||
}
|
||||
}
|
||||
if (errorCode && found) {
|
||||
LOG(("API Error: callbacks cleared without handling! "
|
||||
"Request: %1, error code: %2"
|
||||
).arg(requestId
|
||||
).arg(errorCode));
|
||||
rpcErrorOccured(requestId, h, internal::rpcClientError("CLEAR_CALLBACK", QString("did not handle request %1, error code %2").arg(requestId).arg(errorCode)));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user