select ipv4 peers for peer test

This commit is contained in:
orignal 2016-12-02 11:17:22 -05:00
parent db83cbe58f
commit 7a7ae4cc83
5 changed files with 21 additions and 18 deletions

View file

@ -342,9 +342,9 @@ namespace transport
return nullptr;
}
void SSUServer::CreateSession (std::shared_ptr<const i2p::data::RouterInfo> router, bool peerTest)
void SSUServer::CreateSession (std::shared_ptr<const i2p::data::RouterInfo> router, bool peerTest, bool v4only)
{
auto address = router->GetSSUAddress (!context.SupportsV6 ());
auto address = router->GetSSUAddress (v4only || !context.SupportsV6 ());
if (address)
CreateSession (router, address->host, address->port, peerTest);
else