Daap.Client.UpdateLoop C# (CSharp) Method

UpdateLoop() private method

private UpdateLoop ( ) : void
return void
        private void UpdateLoop()
        {
            while (true) {
                try {
                    if (!updateRunning)
                        break;

                    Refresh ();
                } catch (WebException) {
                    if (!updateRunning)
                        break;

                    // chill out for a while, maybe the server went down
                    // temporarily or something.
                    Thread.Sleep (UpdateSleepInterval);
                } catch (Exception e) {
                    if (!updateRunning)
                        break;

                    Console.Error.WriteLine ("Exception in update loop: " + e);
                    Thread.Sleep (UpdateSleepInterval);
                }
            }
        }