]> git.meshlink.io Git - catta/blobdiff - avahi-sharp/Client.cs
* correct the error handling in EntryGroup
[catta] / avahi-sharp / Client.cs
index 73b6f57c0b85f19db23ea3e84c51d027e928a161..cc77cf870e0100fa1c8da4b22c9065591f70425b 100644 (file)
@@ -232,19 +232,15 @@ namespace Avahi
 
         public void Dispose ()
         {
-            lock (this) {
-                if (handle != IntPtr.Zero) {
-                    thread.Abort ();
-
-                    avahi_client_free (handle);
-                    avahi_simple_poll_quit (spoll);
-                    avahi_simple_poll_free (spoll);
-                    handle = IntPtr.Zero;
-                }
+            if (handle != IntPtr.Zero) {
+                avahi_client_free (handle);
+                avahi_simple_poll_quit (spoll);
+                avahi_simple_poll_free (spoll);
+                handle = IntPtr.Zero;
             }
         }
 
-        internal void CheckError ()
+        internal void ThrowError ()
         {
             ErrorCode error = LastError;
 
@@ -270,7 +266,6 @@ namespace Avahi
                 lock (this) {
                     avahi_simple_poll_loop (spoll);
                 }
-            } catch (ThreadAbortException e) {
             } catch (Exception e) {
                 Console.Error.WriteLine ("Error in avahi-sharp event loop: " + e);
             }