From 1b438e4c49394be9dca6909f7bdedd090f0cc054 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:57:45 +0000 Subject: Utilisateur : Fcolin Date : 7/11/03 Heure : 17:51 Archivé dans $/EScribe/Ivy Commentaire: (vss 12) --- CSharp/Ivy/IvyPPC/IvyClient.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'CSharp') 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; } /// 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(); + } } /// compares two peers the id is the couple (host,service port). -- cgit v1.1