Esempio n. 1
0
 public void SetStatus(IRouter pConsumerRouter, MessageStatus pStatus)
 {
     if (pStatus == MessageStatus.Busy || pStatus == MessageStatus.Queued)
     {
         KeepAliveMonitor.Reset();
         Consumer = pConsumerRouter;
     }
     Status = pStatus;
 }
Esempio n. 2
0
 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");
     }
 }
Esempio n. 3
0
 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}");
     }
 }
Esempio n. 4
0
 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();
         }));
     });
 }
Esempio n. 5
0
        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}");
            });
        }