* ensure the event loop is finished before freeing the poll object
* set Client.Handle to null immediately after freeing it
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1216
941a03a8-eaeb-0310-b9a0-
b1bbd8fe43fe
throw new ClientException (error);
thread = new Thread (PollLoop);
throw new ClientException (error);
thread = new Thread (PollLoop);
+ thread.IsBackground = true;
if (handle != IntPtr.Zero) {
lock (this) {
avahi_client_free (handle);
if (handle != IntPtr.Zero) {
lock (this) {
avahi_client_free (handle);
+ handle = IntPtr.Zero;
+
avahi_simple_poll_quit (spoll);
avahi_simple_poll_quit (spoll);
avahi_simple_poll_free (spoll);
avahi_simple_poll_free (spoll);
try {
lock (this) {
avahi_simple_poll_loop (spoll);
try {
lock (this) {
avahi_simple_poll_loop (spoll);
}
} catch (Exception e) {
Console.Error.WriteLine ("Error in avahi-sharp event loop: " + e);
}
} catch (Exception e) {
Console.Error.WriteLine ("Error in avahi-sharp event loop: " + e);