File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -857,9 +857,13 @@ class RequestImpl : public Request {
857
857
});
858
858
}
859
859
860
+ const string sni_host = (protocol_type == Connection::Type::HTTPS)
861
+ ? parsed_url_.GetHost ().to_string ()
862
+ : address_it->host_name ();
863
+
860
864
RESTC_CPP_LOG_TRACE_ (" RequestImpl::Connect: calling AsyncConnect --> " << endpoint);
861
865
connection->GetSocket ().AsyncConnect (
862
- endpoint, address_it-> host_name () ,
866
+ endpoint, sni_host ,
863
867
properties_->tcpNodelay , ctx.GetYield ());
864
868
RESTC_CPP_LOG_TRACE_ (" RequestImpl::Connect: OK AsyncConnect --> " << endpoint);
865
869
return connection;
@@ -869,7 +873,7 @@ class RequestImpl : public Request {
869
873
connection->GetSocket ().GetSocket ().close ();
870
874
871
875
if (ex.code () == boost::system::errc::resource_unavailable_try_again) {
872
- if ( retries < 8 ) {
876
+ if ( retries < 8 ) {
873
877
RESTC_CPP_LOG_DEBUG_ (
874
878
" RequestImpl::Connect:: Caught boost::system::system_error exception: \" "
875
879
<< ex.what ()
You can’t perform that action at this time.
0 commit comments