You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plugin.debugger.debug("Connection from " + socket.getInetAddress().getHostName() + ":" + socket.getPort() + " under name " + name + " has disconnected.");
70
-
plugin.c.remove(name);
71
-
return;
72
-
}
73
-
while(in.ready()) {
74
-
Stringinput = in.readLine();
75
-
if(!input.equals("heartbeat")) {
76
-
plugin.debugger.debug("[" + socket.getInetAddress().getHostName() + ":" + socket.getPort() + "] [" + name + "] Received input - " + input);
plugin.debugger.debug("[" + socket.getInetAddress().getHostName() + ":" + socket.getPort() + "] [" + name + "] Sent output - " + output);
129
-
}
130
-
} else {
131
-
out.println(output);
132
-
plugin.debugger.debug("[" + socket.getInetAddress().getHostName() + ":" + socket.getPort() + "] [" + name + "] Sent output - " + output);
133
-
}
134
-
}
135
-
plugin.qc.put(name, count);
136
-
}
137
-
sleep(heartbeat);
138
-
} catch(Exceptione) {
139
-
plugin.c.remove(name);
140
-
e.printStackTrace();
141
-
}
142
-
}
143
-
}
67
+
if (active) {
68
+
try {
69
+
out.println("heartbeat");
70
+
if (out.checkError()) {
71
+
plugin.debugger.debug("Connection from " + socket.getInetAddress().getHostName() + ":" + socket.getPort() + " under name " + name + " has disconnected.");
72
+
plugin.c.remove(name);
73
+
active = false;
74
+
return;
75
+
}
76
+
if (in.ready()) {
77
+
Stringinput = in.readLine();
78
+
if (!input.equals("heartbeat")) {
79
+
plugin.debugger.debug("[" + socket.getInetAddress().getHostName() + ":" + socket.getPort() + "] [" + name + "] Received input - " + input);
0 commit comments