Commit 9cd90bcf authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp: Fix host to connect when SSL/TLS is used

parent be71e1f1
......@@ -520,13 +520,11 @@ struct HttpClient {
bev = bufferevent_openssl_socket_new(evbase, -1, ssl,
BUFFEREVENT_SSL_CONNECTING,
BEV_OPT_DEFER_CALLBACKS);
rv = bufferevent_socket_connect_hostname
(bev, dnsbase, AF_UNSPEC, host_string, port);
} else {
bev = bufferevent_socket_new(evbase, -1, BEV_OPT_DEFER_CALLBACKS);
rv = bufferevent_socket_connect_hostname
(bev, dnsbase, AF_UNSPEC, host.c_str(), port);
}
rv = bufferevent_socket_connect_hostname
(bev, dnsbase, AF_UNSPEC, host.c_str(), port);
if(rv != 0) {
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment