public void HandleMainLoopException(ShutdownEventArgs reason) { if (!SetCloseReason(reason)) { LogCloseError("Unexpected Main Loop Exception while closing: " + reason, new Exception(reason.ToString())); return; } OnShutdown(); LogCloseError("Unexpected connection closure: " + reason, new Exception(reason.ToString())); }
private void Connection_ConnectionShutdown(object sender, ShutdownEventArgs e) { Debug.Log("ElmoGameNetwork: Disconnected: " + e.ToString()); DoMainThread.ExecuteOnMainThread(() => { OnDesconnected?.Invoke(); }); // ForceToReconnect(); }
private void OnConsumerShutdown(object sender, ShutdownEventArgs e) { var args = new LogMessageEventArgs { LogType = MqLogType.ConsumerShutdown, Reason = e.ToString() }; OnLog?.Invoke(sender, args); }
void Connection_ConnectionShutdown(object sender, ShutdownEventArgs e) { if (e.Initiator == ShutdownInitiator.Application && e.ReplyCode == 200) { connectionShutdownCompleted?.TrySetResult(true); } else { circuitBreaker.Failure(new Exception(e.ToString())); } }
private void _connection_ConnectionShutdown(IConnection connection, ShutdownEventArgs reason) { CloseConnection(); var msg = "发生端connection连接断开"; if (reason != null) { msg += ",reason:" + reason.ToString(); } Log.Error(msg); }
private void _channnel_ModelShutdown(IModel model, ShutdownEventArgs reason) { CloseConnection(); var msg = "发生端channel连接断开"; if (reason != null) { msg += ",reason:" + reason.ToString(); } Log.Error(msg); }
void Connection_ConnectionShutdown(object sender, ShutdownEventArgs e) { if (e.Initiator == ShutdownInitiator.Application && e.ReplyCode == 200) { connectionShutdownCompleted?.TrySetResult(true); } else if (circuitBreaker.Disarmed) { //log entry handled by event handler registered in ConnectionFactory circuitBreaker.Failure(new Exception(e.ToString())); _ = Task.Run(() => Reconnect()); } else { Logger.WarnFormat("'{0}' connection shutdown while reconnect already in progress: {1}", name, e); } }
void Channel_ModelShutdown(object sender, ShutdownEventArgs e) { if (e.Initiator == ShutdownInitiator.Application) { return; } if (e.Initiator == ShutdownInitiator.Peer && e.ReplyCode == 404) { return; } if (circuitBreaker.Disarmed) { Logger.WarnFormat("'{0}' channel shutdown: {1}", name, e); circuitBreaker.Failure(new Exception(e.ToString())); _ = Task.Run(() => Reconnect()); } else { Logger.WarnFormat("'{0}' channel shutdown while reconnect already in progress: {1}", name, e); } }
public override void HandleModelShutdown(object Model, ShutdownEventArgs Reason) { lock (queue) AddToExceptionText(Reason.ToString()); base.HandleModelShutdown(Model, Reason); }
/// <summary> /// Channel關閉 /// </summary> /// <param name="model"></param> /// <param name="reason"></param> private void Channel_ModelShutdown(object model, ShutdownEventArgs reason) { Console.WriteLine("CHANNEL__MODEL_SHUTDOWN " + reason.ToString()); }
/// <summary> /// Channel關閉 /// </summary> /// <param name="model"></param> /// <param name="reason"></param> private void Channel_ModelShutdown(object model, ShutdownEventArgs reason) { //logger.Info($"{DateTime.Now} Info: CHANNEL__MODEL_SHUTDOWN。 model= {model} Message: {reason.Cause}"); Console.WriteLine("CHANNEL__MODEL_SHUTDOWN " + reason.ToString()); }
private void Connection_ConnectionShutdown(object sender, ShutdownEventArgs e) { _logger.LogWarning(e.ToString()); }
private void ShutdownEvent(object model, ShutdownEventArgs shutdownEventArgs) { logger.LogWarning("ShutdownEvent:{shutdownEventArgs}", shutdownEventArgs.ToString()); }
private static void SubscriptionShutdown(object sender, ShutdownEventArgs e) { Log.Error("SubscriptionShutdown: {0}", e.ToString()); }
public override string ToString() { return(_args.ToString()); }
/// <summary> /// on channel shutdown /// </summary> /// <param name="model"></param> /// <param name="reason"></param> public override void HandleModelShutdown(object model, ShutdownEventArgs reason) { base.HandleModelShutdown(model, reason); this.ReListen(); Trace.TraceError(reason.ToString()); }
public void OnShutDown(ShutdownEventArgs args) { _logger?.LogDebug("OnShutDown for connection: {args}", args.ToString()); }
private void Conn_ConnectionShutdown(object sender, ShutdownEventArgs e) { logger.LogInformation($"Conn_ConnectionShutdown - {sender.ToString()} : {e.ToString()}"); }