@Override
	public void run() {
		while(!manager.stopThreads){
			try {
				//Delay for interval amount of seconds
				Thread.sleep(1000 * this.getInterval());
				System.out.println("Sending HTTP GET to Tracker.");
				generateTrackerURL();
				getTrackerResponse();
				if (manager.stopThreads)
					break;
				decodeTrackerResponse();
				manager.populatePeers(peers);
				manager.connectToPeers();

			} 
			catch (IOException ioe) {
				System.err.println("Unable to connect to tracker.");
				ioe.printStackTrace();
			}catch( BencodingException be){
				System.err.println("Unable to decode tracker response.");
				be.printStackTrace();
			} catch (InterruptedException e) {
				//This, in all likelihood will be called. It is best not to print a stack trace and worry the user.
			}
		}
	}