pull/1576/head
Jeff Becker 3 years ago
parent 4cea33a139
commit 73572b317b
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -119,7 +119,7 @@ namespace llarp
if (not quic) if (not quic)
return false; return false;
quic->receive_packet(tag, buf.underlying); quic->receive_packet(tag, buf.underlying);
return false; return true;
} }
// queue overflow // queue overflow
if (m_UpstreamQueue.size() > MaxUpstreamQueueSize) if (m_UpstreamQueue.size() > MaxUpstreamQueueSize)

@ -26,7 +26,6 @@ namespace llarp
service::ProtocolType t, service::ProtocolType t,
uint64_t) override uint64_t) override
{ {
if (t == service::ProtocolType::Control) if (t == service::ProtocolType::Control)
return true; return true;

@ -170,7 +170,7 @@ namespace llarp::rpc
SockAddr laddr{}; SockAddr laddr{};
laddr.fromString(bindAddr); laddr.fromString(bindAddr);
r->loop()->call([reply, endpoint, r, remoteHost, port, closeID]() { r->loop()->call([reply, endpoint, r, remoteHost, port, closeID, laddr]() {
auto ep = GetEndpointByName(r, endpoint); auto ep = GetEndpointByName(r, endpoint);
if (not ep) if (not ep)
{ {
@ -190,11 +190,19 @@ namespace llarp::rpc
return; return;
} }
auto [addr, id] = quic->open(remoteHost, port); try
util::StatusObject status; {
status["addr"] = addr.toString(); auto [addr, id] = quic->open(
status["id"] = id; remoteHost, port, [](auto&&) {}, laddr);
reply(CreateJSONResponse(status)); util::StatusObject status;
status["addr"] = addr.toString();
status["id"] = id;
reply(CreateJSONResponse(status));
}
catch (std::exception& ex)
{
reply(CreateJSONError(ex.what()));
}
}); });
}); });
}) })

Loading…
Cancel
Save