private void handlePingResponse(Packet pingResponse) {
		//ignore if the ping response is null
		if(pingResponse == null)
			return;

		//if the ping response doesn't have a sequence number of the ping it's responding to then we can't do anything
		if(pingResponse.getLastReceivedSequenceNumber() == Packet.SEQUENCE_NUMBER_NOT_APPLICABLE)
			return;

		synchronized(CONNECTION_LOCK) {
			//if we have no record of when the ping was sent then we can't do anything
			PacketReceipt pingReceipt = recorder.getSentPacketWithSequenceNumber(pingResponse.getLastReceivedSequenceNumber());
			if(pingReceipt == null)
				return;

			//record the latency
			long timeOfPing = pingReceipt.getTime();
			long now = System.currentTimeMillis();
			long timeSincePing = now - timeOfPing;
			latency = (latency == -1 ? timeSincePing : (latency + timeSincePing) / 2);
		}
	}