Exemple #1
0
        public override async Task OnDisconnectedAsync(Exception exception)
        {
            var ci = Context.GetClient();

            try
            {
                await _store.DisconnectClient(ci.Name, ci.Group);

                await base.OnDisconnectedAsync(exception);

                _logger.LogInformation($"{ci} disconnected");
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, $"Disconnect connection failed: {ex.Message}");
            }
        }