summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2007-02-01 10:03:16 +0000
committerfcolin2007-02-01 10:03:16 +0000
commit7963d85af5eedafb600df9b4d9f23cf52f794284 (patch)
tree337c4fd7bc522d20f29bafea11a25686b06edfdd
parent20dc938ef6a5ea0eec354ef35439f2f67c77b34a (diff)
downloadivy-csharp-7963d85af5eedafb600df9b4d9f23cf52f794284.zip
ivy-csharp-7963d85af5eedafb600df9b4d9f23cf52f794284.tar.gz
ivy-csharp-7963d85af5eedafb600df9b4d9f23cf52f794284.tar.bz2
ivy-csharp-7963d85af5eedafb600df9b4d9f23cf52f794284.tar.xz
Utilisateur : Fcolin Date : 11/11/03 Heure : 20:54 Archivé dans $/EScribe/Ivy Commentaire: (vss 6)
-rw-r--r--CSharp/Ivy/IvyPPC/IvyWatcher.cs14
1 files changed, 4 insertions, 10 deletions
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");