1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-02-02 02:44:15 +00:00

use shared from this

This commit is contained in:
Jeff Becker 2017-08-31 10:24:07 -04:00
parent 7af3b751d4
commit 4e4def4fb9
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

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