Exemple #1
0
        public void OnClientDisconnect(IPEndPoint endPoint, IDisconnectInfo info)
        {
            // _logger.Error($"Disconnected: {endPoint.Address} : {endPoint.Port}. Reason: {info.Reason}");
            if (!PeerCollection.TryRemove(endPoint, out var peer))
            {
                _logger.Warning(
                    $"OnClientDisconnect error: can not find peer for endpoint {endPoint.Address}:{endPoint.Port}");
                return;
            }

            PeerCollection.Remove(endPoint);
            ProcessDisconnectedPeer(peer, info);
        }
Exemple #2
0
 protected void LogWarning(string message)
 {
     Logger.Warning("Router.Web",
                    $"{ControllerContext.ActionDescriptor.ControllerName}.{ControllerContext.ActionDescriptor.ActionName}",
                    message);
 }