mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Fix clearing callbacks for timeout-ed requests.
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user