From 7963d85af5eedafb600df9b4d9f23cf52f794284 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:03:16 +0000 Subject: Utilisateur : Fcolin Date : 11/11/03 Heure : 20:54 Archivé dans $/EScribe/Ivy Commentaire: (vss 6) --- CSharp/Ivy/IvyPPC/IvyWatcher.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'CSharp/Ivy/IvyPPC/IvyWatcher.cs') diff --git a/CSharp/Ivy/IvyPPC/IvyWatcher.cs b/CSharp/Ivy/IvyPPC/IvyWatcher.cs index d14b67b..dc8343f 100644 --- a/CSharp/Ivy/IvyPPC/IvyWatcher.cs +++ b/CSharp/Ivy/IvyPPC/IvyWatcher.cs @@ -48,6 +48,7 @@ namespace IvyBus this.domainaddr = domainaddr; this.port = port; listenThread = new Thread(new ThreadStart(this.Run)); + listenThread.Name = "Ivy UDP Listener Thread"; // create the MulticastSocket try { @@ -125,12 +126,6 @@ namespace IvyBus Console.Error.WriteLine("can't connect to " + remotehost + " port " + port + " \n"+ e.Message); } } - catch (ThreadInterruptedException te) - { - Console.Error.WriteLine( te.Message ); - Console.Error.WriteLine( te.StackTrace); - running = false; - } catch (IOException jii) { running = false; @@ -155,12 +150,11 @@ namespace IvyBus lock(this) { traceDebug("begining stopping an IvyWatcher"); - Thread t = listenThread; - listenThread = null; broadcast.Close(); - if (t != null) + if (listenThread != null) { - t.Interrupt(); + listenThread.Join(); + listenThread = null; } // it might not even have been created traceDebug("ending stopping an IvyWatcher"); -- cgit v1.1