Пример #1
0
        public async Task Reconnect()
        {
            reconnecting = true;
            ExponentialBackoff backoff = new ExponentialBackoff();

            while (reconnecting)
            {
                try
                {
                    await backoff.Delay();

                    await xmppCon.ConnectAsync(cts.Token);

                    reconnecting = false;
                }
                catch (Exception)
                {
                }
            }
        }