/**
  * Callback called for every packet received to check if we are waiting for an packet like this.
  * If so, then remove it from the queue.
  *
  * @param packet
  */
 private void checkReceivedPackets(CrtpPacket packet) {
   // compare received packet with expectedReplies in resend queue
   for (CrtpPacket resendQueuePacket : mResendQueue) {
     if (isPacketMatchingExpectedReply(resendQueuePacket, packet)) {
       mResendQueue.remove(resendQueuePacket);
       mLogger.debug("QUEUE REMOVE: " + resendQueuePacket);
       break;
     }
   }
 }
 public void removeRequest(final Request request) {
   for (; mRequestQueue.remove(request); ) {}
   ;
 }