mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-22 00:59:08 +01:00
don't pick next peer same as previous
This commit is contained in:
parent
255c5c1459
commit
6a8c18f2fc
1 changed files with 4 additions and 3 deletions
|
@ -801,7 +801,8 @@ namespace data
|
||||||
return GetRandomRouter (
|
return GetRandomRouter (
|
||||||
[compatibleWith](const RouterInfo * router)->bool
|
[compatibleWith](const RouterInfo * router)->bool
|
||||||
{
|
{
|
||||||
return !router->IsHidden () && router->IsCompatible (*compatibleWith);
|
return !router->IsHidden () && router != compatibleWith &&
|
||||||
|
router->IsCompatible (*compatibleWith);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -810,8 +811,8 @@ namespace data
|
||||||
return GetRandomRouter (
|
return GetRandomRouter (
|
||||||
[compatibleWith](const RouterInfo * router)->bool
|
[compatibleWith](const RouterInfo * router)->bool
|
||||||
{
|
{
|
||||||
return !router->IsHidden () && router->IsCompatible (*compatibleWith) &&
|
return !router->IsHidden () && router != compatibleWith &&
|
||||||
(router->GetCaps () & RouterInfo::eHighBandwidth);
|
router->IsCompatible (*compatibleWith) && (router->GetCaps () & RouterInfo::eHighBandwidth);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue