Fixed Client<HTTPS> socket creation in cases where the socket has been closed
This commit is contained in:
parent
7d95360e62
commit
fad2292061
1 changed files with 2 additions and 2 deletions
|
|
@ -28,8 +28,6 @@ namespace SimpleWeb {
|
|||
|
||||
if(verify_file.size()>0)
|
||||
context.load_verify_file(verify_file);
|
||||
|
||||
socket=std::unique_ptr<HTTPS>(new HTTPS(io_service, context));
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
@ -42,6 +40,8 @@ namespace SimpleWeb {
|
|||
resolver.async_resolve(query, [this]
|
||||
(const boost::system::error_code &ec, boost::asio::ip::tcp::resolver::iterator it){
|
||||
if(!ec) {
|
||||
socket=std::unique_ptr<HTTPS>(new HTTPS(io_service, context));
|
||||
|
||||
boost::asio::async_connect(socket->lowest_layer(), it, [this]
|
||||
(const boost::system::error_code &ec, boost::asio::ip::tcp::resolver::iterator /*it*/){
|
||||
if(!ec) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue