Commit 954f62b8 authored by Stephen's avatar Stephen
Browse files

Fixed server

parent 6ee3636e
......@@ -29,10 +29,6 @@ public class TCPServer implements Runnable {
System.out.println("Server running!");
serverClientSocket = new ServerSocket(port);
servers = new ArrayList<Host>();
// Test join tracker
join(InetAddress.getLocalHost().getHostAddress(), 6790);
sql = new MySQLAccess();
}
......@@ -73,6 +69,8 @@ public class TCPServer implements Runnable {
}
printAllServers();
joined=true;
} else if(joinResponse.getString("status").equalsIgnoreCase("error")){
System.out.println("Error joining tracker, " + joinResponse.getString("description"));
}
} while(!joined);
}
......@@ -207,6 +205,13 @@ public class TCPServer implements Runnable {
}
public void run() {
// Test join tracker
try{
join(InetAddress.getLocalHost().getHostAddress(), 6790);
} catch(Exception e) {
e.printStackTrace();
}
while(true) {
int port = 6790;
try {
......
Supports Markdown
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