mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Add more logging on failed top peers reading.
This commit is contained in:
parent
d6863074b2
commit
0397006894
2 changed files with 6 additions and 0 deletions
|
@ -112,6 +112,7 @@ void RecentPeers::applyLocal(QByteArray serialized) {
|
||||||
).arg(streamAppVersion));
|
).arg(streamAppVersion));
|
||||||
_list.reserve(count);
|
_list.reserve(count);
|
||||||
for (auto i = 0; i != int(count); ++i) {
|
for (auto i = 0; i != int(count); ++i) {
|
||||||
|
const auto streamPosition = stream.underlying().device()->pos();
|
||||||
const auto peer = Serialize::readPeer(
|
const auto peer = Serialize::readPeer(
|
||||||
_session,
|
_session,
|
||||||
streamAppVersion,
|
streamAppVersion,
|
||||||
|
@ -123,6 +124,8 @@ void RecentPeers::applyLocal(QByteArray serialized) {
|
||||||
DEBUG_LOG(("Suggestions: Failed RecentPeers reading %1 / %2."
|
DEBUG_LOG(("Suggestions: Failed RecentPeers reading %1 / %2."
|
||||||
).arg(i + 1
|
).arg(i + 1
|
||||||
).arg(count));
|
).arg(count));
|
||||||
|
DEBUG_LOG(("Failed bytes: %1.").arg(
|
||||||
|
QString::fromUtf8(serialized.mid(streamPosition).toHex())));
|
||||||
_list.clear();
|
_list.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,6 +300,7 @@ void TopPeers::applyLocal(QByteArray serialized) {
|
||||||
_list.reserve(count);
|
_list.reserve(count);
|
||||||
for (auto i = 0; i != int(count); ++i) {
|
for (auto i = 0; i != int(count); ++i) {
|
||||||
auto rating = quint64();
|
auto rating = quint64();
|
||||||
|
const auto streamPosition = stream.underlying().device()->pos();
|
||||||
const auto peer = Serialize::readPeer(
|
const auto peer = Serialize::readPeer(
|
||||||
_session,
|
_session,
|
||||||
streamAppVersion,
|
streamAppVersion,
|
||||||
|
@ -313,6 +314,8 @@ void TopPeers::applyLocal(QByteArray serialized) {
|
||||||
} else {
|
} else {
|
||||||
DEBUG_LOG(("Suggestions: "
|
DEBUG_LOG(("Suggestions: "
|
||||||
"Failed TopPeers reading %1 / %2.").arg(i + 1).arg(count));
|
"Failed TopPeers reading %1 / %2.").arg(i + 1).arg(count));
|
||||||
|
DEBUG_LOG(("Failed bytes: %1.").arg(
|
||||||
|
QString::fromUtf8(serialized.mid(streamPosition).toHex())));
|
||||||
_list.clear();
|
_list.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue