mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
eliminate boost::protect
This commit is contained in:
parent
58939de57e
commit
66ff2c7875
@ -1,5 +1,4 @@
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/protect.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "base64.h"
|
||||
#include "Log.h"
|
||||
@ -388,8 +387,8 @@ namespace util
|
||||
{
|
||||
if (m_Stream)
|
||||
m_Stream->AsyncReceive (boost::asio::buffer (m_StreamBuffer, 8192),
|
||||
boost::protect (boost::bind (&HTTPConnection::HandleStreamReceive, this,
|
||||
boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)),
|
||||
boost::bind (&HTTPConnection::HandleStreamReceive, this,
|
||||
boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred),
|
||||
45); // 45 seconds timeout
|
||||
}
|
||||
|
||||
|
@ -214,8 +214,8 @@ namespace stream
|
||||
}
|
||||
}
|
||||
m_ReceiveTimer.expires_from_now (boost::posix_time::seconds(timeout));
|
||||
m_ReceiveTimer.async_wait (boost::bind (&Stream::HandleReceiveTimer<Buffer, ReceiveHandler>,
|
||||
this, boost::asio::placeholders::error, buffer, handler));
|
||||
m_ReceiveTimer.async_wait ([&buffer, handler, this](const boost::system::error_code& ecode)
|
||||
{ this->HandleReceiveTimer (ecode, buffer, handler); });
|
||||
}
|
||||
|
||||
template<typename Buffer, typename ReceiveHandler>
|
||||
|
Loading…
Reference in New Issue
Block a user