try connecting but still drop

pull/15/head
Jeff Becker 6 years ago
parent 1d5adaf4cc
commit a36de551e4
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -184,17 +184,17 @@ llarp_router::SendToOrQueue(const llarp::RouterID &remote,
// queue buffer
auto &q = outboundMessageQueue[remote];
if(q.size() >= MaxPendingSendQueueSize)
if(q.size() < MaxPendingSendQueueSize)
{
buf.sz = buf.cur - buf.base;
q.emplace(buf.sz);
memcpy(q.back().data(), buf.base, buf.sz);
}
else
{
llarp::LogWarn("tried to queue a message to ", remote,
" but the queue is full so we drop it like it's hawt");
return false;
}
buf.sz = buf.cur - buf.base;
q.emplace(buf.sz);
memcpy(q.back().data(), buf.base, buf.sz);
llarp::RouterContact remoteRC;
// we don't have an open session to that router right now
if(llarp_nodedb_get_rc(nodedb, remote, remoteRC))

Loading…
Cancel
Save