Commit 67767474 authored by Rikysamuel's avatar Rikysamuel
Browse files

Merge branch 'master' of...

Merge branch 'master' of http://gitlab.informatika.org/sinambelajunita/IF3230-Tugas-Besar-Sister-2015
parents 81f4fae8 e8c47b31
......@@ -18,7 +18,7 @@ import server.helper.*;
* @author user
*/
public class Server {
private static String ip;
static String ip;
private static JSONObject j;
/**
* Connecting server to tracker. If tracker says OK then return true, else return false
......
......@@ -62,8 +62,10 @@ public class ServerHandler{
List<Thread> listThread = new ArrayList<>();
listResponses = new ArrayList<>();
for(int i = 0; i < Store.getServers().size(); i++){
listThread.add(new Thread(new ThreadServer(Store.getServer(i),request)));
listThread.get(i).start();
if(Store.getServer(i).getIP().equals(Server.ip)){
listThread.add(new Thread(new ThreadServer(Store.getServer(i),request)));
listThread.get(i).start();
}
}
for(int i = 0; i < Store.getServers().size(); i++){
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