/// <inheritdoc/>
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            var remainingEvents = new List <LogEvent>();

            while (!_queue.IsEmpty)
            {
                LogEvent next;
                _queue.TryDequeue(out next);
                remainingEvents.Add(next);
            }

            Send(remainingEvents).Wait();
            _httpClient.Dispose();
        }