summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC/IvyClient.cs
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:57:45 +0000
committerfcolin2007-02-01 09:57:45 +0000
commit1b438e4c49394be9dca6909f7bdedd090f0cc054 (patch)
tree1c55ca8cabf3e479edbeebe2f9e60dd01c46adc4 /CSharp/Ivy/IvyPPC/IvyClient.cs
parentd7bacbe6f0f37ed078507b4d9d4090eb40bbd332 (diff)
downloadivy-csharp-1b438e4c49394be9dca6909f7bdedd090f0cc054.zip
ivy-csharp-1b438e4c49394be9dca6909f7bdedd090f0cc054.tar.gz
ivy-csharp-1b438e4c49394be9dca6909f7bdedd090f0cc054.tar.bz2
ivy-csharp-1b438e4c49394be9dca6909f7bdedd090f0cc054.tar.xz
Utilisateur : Fcolin Date : 7/11/03 Heure : 17:51 Archivé dans $/EScribe/Ivy Commentaire: (vss 12)
Diffstat (limited to 'CSharp/Ivy/IvyPPC/IvyClient.cs')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyClient.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs
index eabdfb1..3d541d0 100644
--- a/CSharp/Ivy/IvyPPC/IvyClient.cs
+++ b/CSharp/Ivy/IvyPPC/IvyClient.cs
@@ -228,6 +228,7 @@ namespace IvyBus
stopListening();
// bus.clientDisconnect(this);
socket.Close(); // should I also close in and out ?
+ socket = null;
}
/// <summary> sends the substrings of a message to the peer for each matching regexp.
@@ -262,10 +263,12 @@ namespace IvyBus
clientThread = null;
// Tell newThread to go to sleep.
running = false;
- t.Interrupt();
- // Wait for newThread to end.
- t.Join();
-
+ if ( Thread.CurrentThread != t )
+ {
+ t.Interrupt();
+ // Wait for newThread to end.
+ t.Join();
+ }
}
/// <summary> compares two peers the id is the couple (host,service port).