mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Передача ClientProfile в ServerPinger.
This commit is contained in:
parent
07607ec1ef
commit
67f1dcf5f9
2 changed files with 4 additions and 4 deletions
|
@ -332,7 +332,7 @@ function updateProfilesList(profiles) {
|
|||
serverList.getChildren().clear();
|
||||
var index = 0;
|
||||
profiles.forEach(function(profile, i, arr) {
|
||||
pingers[profile] = new ServerPinger(profile.getServerSocketAddress(), profile.getVersion());
|
||||
pingers[profile] = new ServerPinger(profile);
|
||||
|
||||
var serverBtn = new javafx.scene.control.ToggleButton(profile);
|
||||
|
||||
|
|
|
@ -76,9 +76,9 @@ private static void writeUTF16String(HOutput output, String s) throws IOExceptio
|
|||
private Instant cacheTime = null;
|
||||
|
||||
@LauncherAPI
|
||||
public ServerPinger(InetSocketAddress address, ClientProfile.Version version) {
|
||||
this.address = Objects.requireNonNull(address, "address");
|
||||
this.version = Objects.requireNonNull(version, "version");
|
||||
public ServerPinger(ClientProfile profile) {
|
||||
this.address = Objects.requireNonNull(profile.getServerSocketAddress(), "address");
|
||||
this.version = Objects.requireNonNull(profile.getVersion(), "version");
|
||||
}
|
||||
|
||||
private Result doPing() throws IOException {
|
||||
|
|
Loading…
Reference in a new issue