mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +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();
|
serverList.getChildren().clear();
|
||||||
var index = 0;
|
var index = 0;
|
||||||
profiles.forEach(function(profile, i, arr) {
|
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);
|
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;
|
private Instant cacheTime = null;
|
||||||
|
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public ServerPinger(InetSocketAddress address, ClientProfile.Version version) {
|
public ServerPinger(ClientProfile profile) {
|
||||||
this.address = Objects.requireNonNull(address, "address");
|
this.address = Objects.requireNonNull(profile.getServerSocketAddress(), "address");
|
||||||
this.version = Objects.requireNonNull(version, "version");
|
this.version = Objects.requireNonNull(profile.getVersion(), "version");
|
||||||
}
|
}
|
||||||
|
|
||||||
private Result doPing() throws IOException {
|
private Result doPing() throws IOException {
|
||||||
|
|
Loading…
Reference in a new issue