Browse Source

use shared from this

pull/940/head
Jeff Becker 7 years ago
parent
commit
4e4def4fb9
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
  1. 5
      libi2pd/Destination.cpp

5
libi2pd/Destination.cpp

@ -869,11 +869,12 @@ namespace client @@ -869,11 +869,12 @@ namespace client
else
{
// call later if tunnel is not ready
AddReadyCallback([&](const boost::system::error_code & ec) {
auto s = GetSharedFromThis();
AddReadyCallback([s, streamRequestComplete, dest, port](const boost::system::error_code & ec) {
if(ec)
streamRequestComplete(nullptr);
else
CreateStream(streamRequestComplete, dest, port);
s->CreateStream(streamRequestComplete, dest, port);
});
}
}

Loading…
Cancel
Save