|
|
|
@ -375,6 +375,8 @@ namespace transport
@@ -375,6 +375,8 @@ namespace transport
|
|
|
|
|
{ |
|
|
|
|
auto& peer = it1->second; |
|
|
|
|
if (!ecode && peer.router) |
|
|
|
|
{ |
|
|
|
|
while (it != boost::asio::ip::tcp::resolver::iterator()) |
|
|
|
|
{ |
|
|
|
|
auto address = (*it).endpoint ().address (); |
|
|
|
|
LogPrint (eLogDebug, "Transports: ", (*it).host_name (), " has been resolved to ", address); |
|
|
|
@ -387,9 +389,12 @@ namespace transport
@@ -387,9 +389,12 @@ namespace transport
|
|
|
|
|
m_NTCPServer->Connect (address, addr->port, s); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
LogPrint (eLogInfo, "Can't connect to NTCP ", address, " ipv6 is not supported"); |
|
|
|
|
LogPrint (eLogInfo, "Transports: NTCP ", address, " is not supported"); |
|
|
|
|
it++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
LogPrint (eLogError, "Transports: Unable to resolve NTCP address: ", ecode.message ()); |
|
|
|
|
std::unique_lock<std::mutex> l(m_PeersMutex); |
|
|
|
@ -413,6 +418,8 @@ namespace transport
@@ -413,6 +418,8 @@ namespace transport
|
|
|
|
|
{ |
|
|
|
|
auto& peer = it1->second; |
|
|
|
|
if (!ecode && peer.router) |
|
|
|
|
{ |
|
|
|
|
while (it != boost::asio::ip::tcp::resolver::iterator()) |
|
|
|
|
{ |
|
|
|
|
auto address = (*it).endpoint ().address (); |
|
|
|
|
LogPrint (eLogDebug, "Transports: ", (*it).host_name (), " has been resolved to ", address); |
|
|
|
@ -424,9 +431,12 @@ namespace transport
@@ -424,9 +431,12 @@ namespace transport
|
|
|
|
|
m_SSUServer->CreateSession (peer.router, address, addr->port); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
LogPrint (eLogInfo, "Can't connect to SSU ", address, " ipv6 is not supported"); |
|
|
|
|
LogPrint (eLogInfo, "Transports: SSU ", address, " is not supported"); |
|
|
|
|
it++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
LogPrint (eLogError, "Transports: Unable to resolve SSU address: ", ecode.message ()); |
|
|
|
|
std::unique_lock<std::mutex> l(m_PeersMutex); |
|
|
|
|