call stream request callback after CreateStream

This commit is contained in:
orignal 2022-11-09 18:26:16 -05:00
parent 9fd60b52f1
commit 85b78dfb9b

View File

@ -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 ();