title: problems with my socket thread
body: <p>I've been having alot of trouble since I started playing with sockets, I have managed to do basic tasks which I have learnt from tutorials online and with help of the community, but I have realised that I now need to use threads which has added another layer of complications. Below is my thread which I have modified for my needs, but it doesn;t do as intended. I have marked in the code how far the program runs but it stops at the important bit. Could someone take a look and tell me why my program stops here? Thanks in advance.</p>
  
  <pre><code>public void run() {
  try {
      in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
      out = new PrintWriter(socket.getOutputStream(), true);
  
      /// RUNS THIS FAR
      String score = (in.readLine());
      scor = Long.parseLong(score);
          leaderboard(); // A METHOD THAT TAKES LONG SCORE, CALCULATES RANKING AND RETURNS A STRING CALLED RANK
  
  
          System.out.print("Sending rank: " + rank);
          out.println(rank);
  }
  catch(IOException e) {
      System.out.println("PrintWriter error");
  }
  
  //out.println("Hello");
  
  try {
      socket.close();
  }
      catch(IOException e) {
      System.out.println("Failed to close, oddly...");
  }
  }
  </code></pre>