From b44372bdc51a638f871eaf11bab89cac6f97cfb7 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 7 May 2019 11:08:49 -0400 Subject: [PATCH] emplace queue --- llarp/exit/endpoint.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llarp/exit/endpoint.cpp b/llarp/exit/endpoint.cpp index b0d4f9067..1d493f463 100644 --- a/llarp/exit/endpoint.cpp +++ b/llarp/exit/endpoint.cpp @@ -139,6 +139,8 @@ namespace llarp pkt.UpdateIPv4PacketOnDst(src, m_IP); const llarp_buffer_t& pktbuf = pkt.Buffer(); // life time extension uint8_t queue_idx = pktbuf.sz / llarp::routing::ExitPadSize; + if(m_DownstreamQueues.find(queue_idx) == m_DownstreamQueues.end()) + m_DownstreamQueues.emplace(queue_idx, InboundTrafficQueue_t{}); auto& queue = m_DownstreamQueues[queue_idx]; if(queue.size() == 0) {