diff --git a/SparkleLib/SparkleListenerBase.cs b/SparkleLib/SparkleListenerBase.cs index 3593aeff..2c02eb2a 100644 --- a/SparkleLib/SparkleListenerBase.cs +++ b/SparkleLib/SparkleListenerBase.cs @@ -95,7 +95,6 @@ namespace SparkleLib { public abstract void Connect (); public abstract void Announce (SparkleAnnouncement announcent); public abstract void AlsoListenTo (string folder_identifier); - public abstract void Dispose (); public abstract bool IsConnected { get; } @@ -104,11 +103,11 @@ namespace SparkleLib { protected List queue_down = new List (); protected bool is_connecting; protected string server; - protected Timer reconnect_timer = new Timer { Interval = 60 * 1000}; + protected Timer reconnect_timer = new Timer { Interval = 60 * 1000, Enabled = true }; public SparkleListenerBase (string server, string folder_identifier, NotificationServerType type) { this.reconnect_timer.Elapsed += delegate { - if (!IsConnected && !IsConnecting) + if (!IsConnected && !this.is_connecting) Reconnect (); }; @@ -185,6 +184,12 @@ namespace SparkleLib { } + public virtual void Dispose () + { + this.reconnect_timer.Dispose (); + } + + public string Server { get { return this.server; diff --git a/SparkleLib/SparkleListenerIrc.cs b/SparkleLib/SparkleListenerIrc.cs index a484b6ba..4be5b7ec 100644 --- a/SparkleLib/SparkleListenerIrc.cs +++ b/SparkleLib/SparkleListenerIrc.cs @@ -137,6 +137,7 @@ namespace SparkleLib { { this.thread.Abort (); this.thread.Join (); + base.Dispose (); } diff --git a/SparkleShare/Mac/SparkleUI.cs b/SparkleShare/Mac/SparkleUI.cs index e2c055cb..ed310779 100644 --- a/SparkleShare/Mac/SparkleUI.cs +++ b/SparkleShare/Mac/SparkleUI.cs @@ -77,7 +77,7 @@ namespace SparkleShare { Font = NSFontManager.SharedFontManager.FontWithFamily ("Lucida Grande", NSFontTraitMask.Condensed, 0, 13); - + OpenLogs = new List (); StatusIcon = new SparkleStatusIcon (); }