fix bug in findRelaysOnce: it connects to all relays

This commit is contained in:
vyzo 2019-04-21 11:18:24 +03:00
parent 776a53a370
commit abfb4c8901
1 changed files with 3 additions and 0 deletions

View File

@ -159,6 +159,9 @@ func (ar *AutoRelay) findRelaysOnce(ctx context.Context) bool {
update := false
for _, pi := range pis {
update = ar.tryRelay(ctx, pi) || update
if ar.numRelays() >= DesiredRelays {
break
}
}
return update
}