Merge remote-tracking branch 'origin/Jonas_Stuff' into Jonas_Stuff
This commit is contained in:
commit
55a5fe50b7
@ -31,12 +31,13 @@ public class ClientPinger implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
while (socket.isConnected()) {
|
||||
gotPingBack = false;
|
||||
out.write("CPING");
|
||||
out.newLine();
|
||||
out.flush();
|
||||
Thread.sleep(5000);
|
||||
Thread.sleep(4000);
|
||||
if (gotPingBack) {
|
||||
if (!isConnected) { //if !isConnected, then the connection had been lost before.
|
||||
isConnected = true;
|
||||
|
||||
@ -31,12 +31,13 @@ public class ServerPinger implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
while (socket.isConnected()) {
|
||||
gotPingBack = false;
|
||||
out.write("SPING");
|
||||
out.newLine();
|
||||
out.flush();
|
||||
Thread.sleep(5000);
|
||||
Thread.sleep(4000);
|
||||
if (gotPingBack) {
|
||||
if (!isConnected) { //if !isConnected, then the connection had been lost before.
|
||||
isConnected = true;
|
||||
|
||||
Reference in New Issue
Block a user