From a6f62a99b9583395eaf242fe4d2c56c0d4efa06a Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 31 Aug 2017 10:37:53 -0400 Subject: [PATCH] Revert "use shared from this" This reverts commit 4e4def4fb90f8a0cb1faf61a935479f7527168bf. --- libi2pd/Destination.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libi2pd/Destination.cpp b/libi2pd/Destination.cpp index e544b082..a32e2ffa 100644 --- a/libi2pd/Destination.cpp +++ b/libi2pd/Destination.cpp @@ -869,12 +869,11 @@ namespace client else { // call later if tunnel is not ready - auto s = GetSharedFromThis(); - AddReadyCallback([s, streamRequestComplete, dest, port](const boost::system::error_code & ec) { + AddReadyCallback([&](const boost::system::error_code & ec) { if(ec) streamRequestComplete(nullptr); else - s->CreateStream(streamRequestComplete, dest, port); + CreateStream(streamRequestComplete, dest, port); }); } }