Fixed double thread issue! :D

This commit is contained in:
William Muir
2017-08-16 20:09:05 +12:00
parent 07a39722fb
commit dad2ebf693
4 changed files with 10 additions and 10 deletions
@@ -56,14 +56,9 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
public void run() {
ServerListenThread serverListenThread;
HeartbeatThread heartbeatThread;
serverListenThread = new ServerListenThread(serverSocket, this);
heartbeatThread = new HeartbeatThread(this);
heartbeatThread.start();
serverListenThread.start();
new HeartbeatThread(this);
new ServerListenThread(serverSocket, this);
//You should handle interrupts in some way, so that the thread won't keep on forever if you exit the app.
while (!terminated) {