Skip to content
Snippets Groups Projects
Commit be77bb05 authored by akwizgran's avatar akwizgran
Browse files

Reconnect after closing socket due to inactivity.

parent f33e7a29
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment