diff --git a/SparkleLib/SparkleListenerBase.cs b/SparkleLib/SparkleListenerBase.cs index 9c173dc7..9f5c3476 100755 --- a/SparkleLib/SparkleListenerBase.cs +++ b/SparkleLib/SparkleListenerBase.cs @@ -16,10 +16,8 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Timers; -using System.Linq; namespace SparkleLib { diff --git a/SparkleLib/SparkleListenerTcp.cs b/SparkleLib/SparkleListenerTcp.cs index 90909e38..ef80630e 100755 --- a/SparkleLib/SparkleListenerTcp.cs +++ b/SparkleLib/SparkleListenerTcp.cs @@ -16,14 +16,9 @@ using System; -using System.IO; using System.Text; using System.Threading; -using System.Net.NetworkInformation; using System.Net.Sockets; -using System.Security.Cryptography; -using System.Collections.Generic; -using System.Xml.Serialization; namespace SparkleLib { @@ -122,6 +117,9 @@ namespace SparkleLib { // We've timed out, let's ping the server to // see if the connection is still up } catch (SocketException e) { + + Console.WriteLine ("1st catch block"); + try { byte [] ping_bytes = Encoding.UTF8.GetBytes ("ping"); @@ -148,6 +146,8 @@ namespace SparkleLib { this.socket.ReceiveTimeout = 60 * 1000; + Console.WriteLine ("2nd catch block"); + OnDisconnected (e.Message); break; }