Added workaround for buggy MSVS
This commit is contained in:
parent
56d36ddf92
commit
b1200958cc
2 changed files with 9 additions and 9 deletions
|
|
@ -46,21 +46,21 @@ namespace SimpleWeb {
|
|||
(const boost::system::error_code &ec, boost::asio::ip::tcp::resolver::iterator /*it*/){
|
||||
if(!ec) {
|
||||
boost::asio::ip::tcp::no_delay option(true);
|
||||
socket->lowest_layer().set_option(option);
|
||||
this->socket->lowest_layer().set_option(option);
|
||||
|
||||
auto timer=get_timeout_timer();
|
||||
socket->async_handshake(boost::asio::ssl::stream_base::client,
|
||||
[this, timer](const boost::system::error_code& ec) {
|
||||
this->socket->async_handshake(boost::asio::ssl::stream_base::client,
|
||||
[this, timer](const boost::system::error_code& ec) {
|
||||
if(timer)
|
||||
timer->cancel();
|
||||
if(ec) {
|
||||
socket=nullptr;
|
||||
this->socket=nullptr;
|
||||
throw boost::system::system_error(ec);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
socket=nullptr;
|
||||
this->socket=nullptr;
|
||||
throw boost::system::system_error(ec);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue