diff --git a/llarp/crypto/encrypted_frame.hpp b/llarp/crypto/encrypted_frame.hpp index b74aaff50..a5b169060 100644 --- a/llarp/crypto/encrypted_frame.hpp +++ b/llarp/crypto/encrypted_frame.hpp @@ -13,7 +13,7 @@ namespace llarp static constexpr size_t EncryptedFrameOverheadSize = PUBKEYSIZE + TUNNONCESIZE + SHORTHASHSIZE; - static constexpr size_t EncryptedFrameBodySize = 1024; + static constexpr size_t EncryptedFrameBodySize = 128 * 6; static constexpr size_t EncryptedFrameSize = EncryptedFrameOverheadSize + EncryptedFrameBodySize; diff --git a/llarp/messages/relay_commit.cpp b/llarp/messages/relay_commit.cpp index c1b956b64..08f2f95b3 100644 --- a/llarp/messages/relay_commit.cpp +++ b/llarp/messages/relay_commit.cpp @@ -244,7 +244,7 @@ namespace llarp // store it into netdb if we don't have it if(!n->Has(rc.pubkey)) { - std::function< void(std::shared_ptr< LRCMFrameDecrypt >) > cb = + static std::function< void(std::shared_ptr< LRCMFrameDecrypt >) > cb = [](std::shared_ptr< LRCMFrameDecrypt > ctx) { ctx->context->ForwardLRCM(ctx->hop->info.upstream, ctx->frames); diff --git a/llarp/utp/session.cpp b/llarp/utp/session.cpp index 225d2f802..81ff2058e 100644 --- a/llarp/utp/session.cpp +++ b/llarp/utp/session.cpp @@ -255,9 +255,6 @@ namespace llarp { if(sendq.size() >= MaxSendQueueSize) return false; - // preemptive pump - if(sendq.size() >= MaxSendQueueSize / 8) - PumpWrite(); size_t sz = buf.sz; byte_t* ptr = buf.base; uint32_t msgid = m_NextTXMsgID++; @@ -273,6 +270,7 @@ namespace llarp ptr += s; sz -= s; } + PumpWrite(); return true; }