dht: avoid building oversized UDP packets

This commit is contained in:
Adrien Béraud committed 2016-01-19 15:24:05 -05:00
1 parent 9ee962bd21
commit 3ee22bb6d7
1 file changed
+1 -1
+1 -1
View File
@@ -3080,7 +3080,7 @@ Dht::sendNodesValues(const sockaddr *sa, socklen_t salen, TransId tid,
pk.pack(*st[j].data);
k++;
j = (j + 1) % st.size();
} while (j != j0 && k < 50);
} while (j != j0 && k < 50 && buffer.size() < MAX_VALUE_SIZE);
}
pk.pack(std::string("t")); pk.pack_bin(tid.size());