diff options
author | James Willcox <snopr@snorp.net> | 2005-10-26 18:01:56 +0000 |
---|---|---|
committer | James Willcox <snopr@snorp.net> | 2005-10-26 18:01:56 +0000 |
commit | 740bc001fb647255709b5385d5a8a19781722097 (patch) | |
tree | 3304bd16129de21fab3af89b7ab057a7f54e75c9 /avahi-sharp/Client.cs | |
parent | 404c44c11b3d63c6a53b81ed7b9231387305c33f (diff) |
* correct the error handling in EntryGroup
* get rid of evil Thread.Abort
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@878 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-sharp/Client.cs')
-rw-r--r-- | avahi-sharp/Client.cs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/avahi-sharp/Client.cs b/avahi-sharp/Client.cs index 73b6f57..cc77cf8 100644 --- a/avahi-sharp/Client.cs +++ b/avahi-sharp/Client.cs @@ -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); } |