@Override
	public void run() {

        byte[] receiveData = new byte[1024];
	
		while(active) {
			try {
				DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
				
		        serverSocket.receive(receivePacket);
		        String sentence = new String(receivePacket.getData(), 0, receivePacket.getLength());

		        InetAddress ipAddress = receivePacket.getAddress();
		        
		        if(sentence.equals(QueryResponse.REQUEST_PHRASE)) {

		        	if(serverAddr != null && server != null) {
			        	byte[] response = createResponse().getResponseData().getBytes();
				        int port = receivePacket.getPort();
				        DatagramPacket sendPacket = new DatagramPacket(response, response.length, ipAddress, port);
				        serverSocket.send(sendPacket);
		        	}
		        } else {
			        log.err("Bad request from " + ipAddress.getHostAddress() + "!");
		        }
		        
			}catch(IOException e) {
				log.err("Error while waiting for request! Never mind...");
				log.excp(e);
			}
		}
	}