1.3. Оказывается, закрывать сокет не надо, клиент сам сделает.
This commit is contained in:
parent
34b6a5061d
commit
ffd0758857
1 changed files with 4 additions and 3 deletions
|
|
@ -12,8 +12,9 @@ public class ServerThread extends Thread {
|
|||
|
||||
private static final String MODERN_RESPONSE =
|
||||
"{\"version\": {\"name\": \"b1.7.3\",\"protocol\": -17}," +
|
||||
"\"players\": {\"max\": %max%,\"online\": %now%,\"sample\": []}," +
|
||||
"\"description\": {\"text\": \"%motd%\"},\"enforcesSecureChat\": false}";
|
||||
"\"players\": {\"max\": %max%,\"online\": %now%}," +
|
||||
"\"description\": {\"text\": \"%motd%\"}," +
|
||||
"\"enforcesSecureChat\": false,\"previewsChat\": true}";
|
||||
private final ServerSocket serverSocket;
|
||||
private final AtomicBoolean working = new AtomicBoolean(false);
|
||||
private final Server minecraftServer;
|
||||
|
|
@ -62,7 +63,7 @@ public class ServerThread extends Thread {
|
|||
this.responseForModernPing(outputStream);
|
||||
}
|
||||
outputStream.flush();
|
||||
socket.close();
|
||||
//socket.close();
|
||||
} catch (SocketTimeoutException ignore) {
|
||||
} catch (IOException ex) {
|
||||
System.out.println("Exception caught: " + ex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue