From 85b78dfb9b600ebf2834c8e08929df052a48a4ac Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 9 Nov 2022 18:26:16 -0500 Subject: [PATCH] call stream request callback after CreateStream --- libi2pd/Destination.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libi2pd/Destination.cpp b/libi2pd/Destination.cpp index 581fc733..c39a2533 100644 --- a/libi2pd/Destination.cpp +++ b/libi2pd/Destination.cpp @@ -1096,7 +1096,13 @@ namespace client } auto leaseSet = FindLeaseSet (dest); if (leaseSet) - streamRequestComplete(CreateStream (leaseSet, port)); + { + auto stream = CreateStream (leaseSet, port); + GetService ().post ([streamRequestComplete, stream]() + { + streamRequestComplete(stream); + }); + } else { auto s = GetSharedFromThis ();