From 7b00d828b2b26862920542f7dd428793869931ce Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 1 Jan 2018 08:28:42 -0500 Subject: [PATCH] fix lambda capture, don't capture copy --- libi2pd/Streaming.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd/Streaming.h b/libi2pd/Streaming.h index 93cf2a9f..6c933752 100644 --- a/libi2pd/Streaming.h +++ b/libi2pd/Streaming.h @@ -334,7 +334,7 @@ namespace stream void Stream::AsyncReceive (const Buffer& buffer, ReceiveHandler handler, int timeout) { auto s = shared_from_this(); - m_Service.post ([=](void) + m_Service.post ([s, buffer, handler, timeout](void) { if (!s->m_ReceiveQueue.empty () || s->m_Status == eStreamStatusReset) s->HandleReceiveTimer (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), buffer, handler, 0);