public void SetStatus(IRouter pConsumerRouter, MessageStatus pStatus) { if (pStatus == MessageStatus.Busy || pStatus == MessageStatus.Queued) { KeepAliveMonitor.Reset(); Consumer = pConsumerRouter; } Status = pStatus; }
private void _objKeepAliveMonitor_TimeOut(object sender, EventArgs e) { Log.Debug($"Client {ID} timeout, pinging..."); _objKeepAliveMonitor.StartCountDown(); if (_objClient.Ping()) { _objKeepAliveMonitor.Reset(); Log.Debug($"Client {ID} pong received"); } }
private void _objKeepAliveMonitor_TimeOut(object sender, EventArgs e) { Log.Debug($"Connection timeout: {ID}, pinging..."); _objKeepAliveMonitor.StartCountDown(); if (_objWebSocketClient.Ping()) { _objKeepAliveMonitor.Reset(); Log.Debug($"Pong received: {ID}"); } }
private void KeepAliveMonitor_TimeOut(object sender, EventArgs e) { Task.Run(() => { Console.WriteLine("Timeout for consumer queue, sending ping..."); ControlFactory.Processor.Request(new ControlRequest <PongResponse>(this, new PingRequest(), (PongResponse r) => { KeepAliveMonitor.Reset(); })); }); }
private void _objKeepAliveMonitor_TimeOut(object sender, EventArgs e) { Log.Info($"Request {Message.Name}({Message.ID}) timed out on {_objClient.ID}, checking status..."); _objKeepAliveMonitor.StartCountDown(); Task.Run(() => { if (_objClient.IsAlive(Message.ID)) { _objKeepAliveMonitor.Reset(); } Log.Info($"Request {Message.Name}({Message.ID}) on {_objClient.ID}"); }); }