Beispiel #1
0
        private void KeepAliveMonitor_TimeOut(object sender, System.EventArgs e)
        {
            Log.Info($"Request {Request.RequestID} timed out on {Router.ConnectionID}, checking status...");
            KeepAliveMonitor.StartCountDown();

            if (Consumer != null)
            {
                Task.Run(() => {
                    ControlFactory.Processor.Request(new ControlRequest <GetMessageStatusResponse>(
                                                         Consumer,
                                                         new GetMessageStatusRequest(Request.RequestID),
                                                         (GetMessageStatusResponse r) => {
                        if (r.IsAlive)
                        {
                            KeepAliveMonitor.Reset();
                        }
                        else
                        {
                            EndRequest();
                            RequestTimedOut?.Invoke(this, this);
                        }
                    }
                                                         ));
                });
            }
        }
Beispiel #2
0
        private void TimerTimeoutElapsed(object sender, ElapsedEventArgs e)
        {
            // set this to true so the request can be used with another
            // peer if needed.
            HasTimedOut = true;

            Stop();
            RequestTimedOut?.Invoke(this, EventArgs.Empty);
        }
Beispiel #3
0
        private void KeepAliveMonitor_TimeOut(object sender, EventArgs e)
        {
            Log.Info($"Frame {Frame.RequestID} timed out");

            KeepAliveMonitor.TimeOut -= KeepAliveMonitor_TimeOut;
            KeepAliveMonitor.Stop();

            RequestTimedOut?.Invoke(this, this);
        }
Beispiel #4
0
        private void TimerTimeoutElapsed(object sender, ElapsedEventArgs e)
        {
            if (_requestCanceled)
            {
                return;
            }

            _timeoutTimer.Stop();
            RequestTimedOut?.Invoke(this, EventArgs.Empty);
        }
Beispiel #5
0
        private void _objKeepAliveMonitor_UnResponsive(object sender, EventArgs e)
        {
            _objKeepAliveMonitor.Stop();

            SetResponse(
                MessagingFactory.Provider.GetResponseMessage(
                    typeof(T),
                    Message,
                    new ResponseStatus(ResponseState.TimeOut)
                    )
                );
            RequestTimedOut?.Invoke(sender, this);

            Log.Info($"Request {Message.Name}({Message.ID}) unresponsive on {_objClient.ID}, cleaning up...");
        }
Beispiel #6
0
 /// <summary>
 /// Occurs when a request times out.
 /// </summary>
 /// <param name="e">Arguments for the event.</param>
 protected virtual void OnRequestTimedOut(RetryEventArgs e)
 {
     RequestTimedOut?.Invoke(this, e);
 }
Beispiel #7
0
 internal void NotifyRequestTimedOut(RequestTimedOutEventArgs eventArgs)
 => RequestTimedOut?.Invoke(this, eventArgs);
Beispiel #8
0
 private void KeepAliveMonitor_UnResponsive(object sender, System.EventArgs e)
 {
     EndRequest();
     RequestTimedOut?.Invoke(this, this);
 }