mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-04 15:31:53 +03:00
Protocol of updater fix.
This commit is contained in:
parent
4ee6b31371
commit
fd9ba37dd3
1 changed files with 13 additions and 15 deletions
|
@ -1,7 +1,6 @@
|
||||||
package ru.gravit.launchserver;
|
package ru.gravit.launchserver;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
@ -53,8 +52,8 @@ public void run() {
|
||||||
s.getOutputStream().write(2);
|
s.getOutputStream().write(2);
|
||||||
@SuppressWarnings("resource") // s.close() closes it.
|
@SuppressWarnings("resource") // s.close() closes it.
|
||||||
HInput in = new HInput(s.getInputStream());
|
HInput in = new HInput(s.getInputStream());
|
||||||
if (in.readBoolean()) {
|
|
||||||
int num = in.readInt();
|
int num = in.readInt();
|
||||||
|
if (num == lastNum) return;
|
||||||
for (int i = 0; i < num; i++) {
|
for (int i = 0; i < num; i++) {
|
||||||
if (i >= lastNum) {
|
if (i >= lastNum) {
|
||||||
String classN = in.readString(1024);
|
String classN = in.readString(1024);
|
||||||
|
@ -68,7 +67,6 @@ public void run() {
|
||||||
LogHelper.error(e);
|
LogHelper.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (num != lastNum) lastNum = num;
|
if (num != lastNum) lastNum = num;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue