mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-16 00:12:43 +00:00
fix lambda capture, don't capture copy
This commit is contained in:
parent
d5e9fc7677
commit
7b00d828b2
@ -334,7 +334,7 @@ namespace stream
|
|||||||
void Stream::AsyncReceive (const Buffer& buffer, ReceiveHandler handler, int timeout)
|
void Stream::AsyncReceive (const Buffer& buffer, ReceiveHandler handler, int timeout)
|
||||||
{
|
{
|
||||||
auto s = shared_from_this();
|
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)
|
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);
|
s->HandleReceiveTimer (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), buffer, handler, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user