| Index: content/browser/renderer_host/p2p/socket_host_tcp.cc
|
| diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
|
| index ce99a1ff04f596e8b616c1463c8458fd1ac414e6..a5aac2f0808012a28f0f316f81c7526d56c3f806 100644
|
| --- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
|
| +++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
|
| @@ -185,10 +185,17 @@ void P2PSocketHostTcpBase::StartTls() {
|
|
|
| // Default ssl config.
|
| const net::SSLConfig ssl_config;
|
| - net::HostPortPair dest_host_port_pair =
|
| - net::HostPortPair::FromIPEndPoint(remote_address_.ip_address);
|
| - if (!remote_address_.hostname.empty())
|
| - dest_host_port_pair.set_host(remote_address_.hostname);
|
| + net::HostPortPair dest_host_port_pair;
|
| + if (remote_address_.ip_address.address().empty()) {
|
| + DCHECK(!remote_address_.hostname.empty());
|
| + dest_host_port_pair = net::HostPortPair::FromString(
|
| + remote_address_.hostname);
|
| + } else {
|
| + dest_host_port_pair = net::HostPortPair::FromIPEndPoint(
|
| + remote_address_.ip_address);
|
| + if (!remote_address_.hostname.empty())
|
| + dest_host_port_pair.set_host(remote_address_.hostname);
|
| + }
|
|
|
| net::ClientSocketFactory* socket_factory =
|
| net::ClientSocketFactory::GetDefaultFactory();
|
|
|