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); } } )); }); } }
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); }
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); }
private void TimerTimeoutElapsed(object sender, ElapsedEventArgs e) { if (_requestCanceled) { return; } _timeoutTimer.Stop(); RequestTimedOut?.Invoke(this, EventArgs.Empty); }
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..."); }
/// <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); }
internal void NotifyRequestTimedOut(RequestTimedOutEventArgs eventArgs) => RequestTimedOut?.Invoke(this, eventArgs);
private void KeepAliveMonitor_UnResponsive(object sender, System.EventArgs e) { EndRequest(); RequestTimedOut?.Invoke(this, this); }