tunnel: hold peers in an ArrayList
A set will cause identical peers to be dropped during save Reported-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
065893e31d
commit
1ca4dbf1a2
@ -17,10 +17,8 @@ import java.io.InputStreamReader;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
@ -187,7 +185,7 @@ public final class Config {
|
|||||||
@SuppressWarnings("UnusedReturnValue")
|
@SuppressWarnings("UnusedReturnValue")
|
||||||
public static final class Builder {
|
public static final class Builder {
|
||||||
// Defaults to an empty set.
|
// Defaults to an empty set.
|
||||||
private final Set<Peer> peers = new LinkedHashSet<>();
|
private final ArrayList<Peer> peers = new ArrayList<>();
|
||||||
// No default; must be provided before building.
|
// No default; must be provided before building.
|
||||||
@Nullable private Interface interfaze;
|
@Nullable private Interface interfaze;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user