Commit be77bb05 authored by akwizgran's avatar akwizgran

Reconnect after closing socket due to inactivity.

parent f33e7a29
......@@ -59,7 +59,9 @@ class NetworkClient extends Thread {
long inactive = System.currentTimeMillis() - lastActive;
if (inactive > 2 * keepaliveIntervalMs) {
log.log("Inactive for " + (inactive / 1000) + " seconds, closing socket");
closeConnection();
synchronized (this) {
if (socket != null) tryToClose(socket);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment