mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-17 00:38:50 +00:00
correctly detect and report when syncs are too large, fix logging
This commit is contained in:
@ -78,11 +78,11 @@ void RelayServer::runNegentropy(ThreadPool<MsgNegentropy>::Thread &thr) {
|
|||||||
auto *view = views.findView(sub.connId, sub.subId);
|
auto *view = views.findView(sub.connId, sub.subId);
|
||||||
if (!view) return;
|
if (!view) return;
|
||||||
|
|
||||||
LI << "[" << sub.connId << "] Negentropy query matched " << view->ne.items.size() << " events in "
|
LI << "[" << sub.connId << "] Negentropy query matched " << view->levIds.size() << " events in "
|
||||||
<< (hoytech::curr_time_us() - view->startTime) << "us";
|
<< (hoytech::curr_time_us() - view->startTime) << "us";
|
||||||
|
|
||||||
if (view->ne.items.size() > cfg().relay__negentropy__maxSyncEvents) {
|
if (view->levIds.size() > cfg().relay__negentropy__maxSyncEvents) {
|
||||||
LI << "[" << sub.connId << "] Negentropy query size exceeeded " << cfg().relay__negentropy__maxSyncEvents;
|
LI << "[" << sub.connId << "] Negentropy query size exceeded " << cfg().relay__negentropy__maxSyncEvents;
|
||||||
|
|
||||||
sendToConn(sub.connId, tao::json::to_string(tao::json::value::array({
|
sendToConn(sub.connId, tao::json::to_string(tao::json::value::array({
|
||||||
"NEG-ERR",
|
"NEG-ERR",
|
||||||
|
Reference in New Issue
Block a user