mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
kiiiiiick
This commit is contained in:
parent
efe5fd3b5b
commit
1827ff63f1
|
@ -419,6 +419,7 @@ namespace llarp
|
||||||
// messages to the remote
|
// messages to the remote
|
||||||
if (auto itr = pending_conn_msg_queue.find(rid); itr != pending_conn_msg_queue.end())
|
if (auto itr = pending_conn_msg_queue.find(rid); itr != pending_conn_msg_queue.end())
|
||||||
{
|
{
|
||||||
|
log::critical(logcat, "Clearing pending queue for RID:{}", rid);
|
||||||
auto& que = itr->second;
|
auto& que = itr->second;
|
||||||
|
|
||||||
while (not que.empty())
|
while (not que.empty())
|
||||||
|
@ -428,6 +429,7 @@ namespace llarp
|
||||||
if (m.is_control)
|
if (m.is_control)
|
||||||
{
|
{
|
||||||
auto& msg = reinterpret_cast<PendingControlMessage&>(m);
|
auto& msg = reinterpret_cast<PendingControlMessage&>(m);
|
||||||
|
log::critical(logcat, "Dispatching {} request!", msg.endpoint);
|
||||||
ep.conns[rid]->control_stream->command(msg.endpoint, msg.body, msg.func);
|
ep.conns[rid]->control_stream->command(msg.endpoint, msg.body, msg.func);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -438,7 +440,9 @@ namespace llarp
|
||||||
|
|
||||||
que.pop_front();
|
que.pop_front();
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
log::warning(logcat, "No pending queue to clear for RID:{}", rid);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -616,6 +620,14 @@ namespace llarp
|
||||||
const RemoteRC& source, std::string payload, std::function<void(oxen::quic::message m)> func)
|
const RemoteRC& source, std::string payload, std::function<void(oxen::quic::message m)> func)
|
||||||
{
|
{
|
||||||
_router.loop()->call([this, source, payload, f = std::move(func)]() {
|
_router.loop()->call([this, source, payload, f = std::move(func)]() {
|
||||||
|
|
||||||
|
if (auto conn = ep.get_conn(source); conn)
|
||||||
|
{
|
||||||
|
log::critical(logcat, "Dispatched bootstrap fetch request!");
|
||||||
|
conn->control_stream->command("bfetch_rcs"s, std::move(payload), std::move(f));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
log::critical(logcat, "Queuing bootstrap fetch request");
|
log::critical(logcat, "Queuing bootstrap fetch request");
|
||||||
auto pending = PendingControlMessage(std::move(payload), "bfetch_rcs"s, f);
|
auto pending = PendingControlMessage(std::move(payload), "bfetch_rcs"s, f);
|
||||||
|
|
||||||
|
@ -639,9 +651,9 @@ namespace llarp
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
oxenc::bt_dict_consumer btdc{m.body()};
|
oxenc::bt_dict_consumer btdc{m.body()};
|
||||||
quantity = btdc.require<size_t>("quantity");
|
|
||||||
btdc.required("local");
|
btdc.required("local");
|
||||||
remote = RemoteRC{btdc.consume_dict_consumer()};
|
remote = RemoteRC{btdc.consume_dict_consumer()};
|
||||||
|
quantity = btdc.require<size_t>("quantity");
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue