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