private void OnDisconnected() { TaskAsyncHelper.Delay(TimeSpan.FromSeconds(5)).Then(() => { _connection.Start(_transportFactory()).Then(() => { // Join JabbR _chat.Invoke("Join", false); }); }); }
private async void OnDisconnected() { await TaskAsyncHelper.Delay(TimeSpan.FromSeconds(5)); try { await _connection.Start(_transportFactory()); // Join JabbR await _chat.Invoke("Join", false); } catch (Exception ex) { _connection.Trace(TraceLevels.Events, ex.Message); } }