private void TimeoutMessage() { if (waitingResponse.Count > 0) { if ((DateTime.UtcNow - waitingResponse[0].SentAt) > engine.TimeOut) { SendDetails details = waitingResponse.Dequeue(); MessageFactory.UnregisterSend((QueryMessage)details.Message); RaiseMessageSent(details.Destination, (QueryMessage)details.Message, null); } } }
internal PeerMessage Dequeue() { return(sendQueue.Dequeue()); }