From ff9ee5873f9591cdc4704dc1deab7eabfd911199 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 17 Mar 2021 15:10:14 -0400 Subject: [PATCH] post LeaseSet creation to I2CP destnation's thread --- libi2pd_client/I2CP.cpp | 5 +++++ libi2pd_client/I2CP.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/libi2pd_client/I2CP.cpp b/libi2pd_client/I2CP.cpp index c9db4a82..5cd1812a 100644 --- a/libi2pd_client/I2CP.cpp +++ b/libi2pd_client/I2CP.cpp @@ -85,6 +85,11 @@ namespace client } void I2CPDestination::CreateNewLeaseSet (std::vector > tunnels) + { + GetService ().post (std::bind (&I2CPDestination::PostCreateNewLeaseSet, this, tunnels)); + } + + void I2CPDestination::PostCreateNewLeaseSet (std::vector > tunnels) { if (m_IsCreatingLeaseSet) { diff --git a/libi2pd_client/I2CP.h b/libi2pd_client/I2CP.h index da7d8ffa..983951a4 100644 --- a/libi2pd_client/I2CP.h +++ b/libi2pd_client/I2CP.h @@ -101,6 +101,8 @@ namespace client { return std::static_pointer_cast(shared_from_this ()); } bool SendMsg (std::shared_ptr msg, std::shared_ptr remote); + void PostCreateNewLeaseSet (std::vector > tunnels); + private: std::shared_ptr m_Owner;