summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC/IvyClient.cs
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:57:39 +0000
committerfcolin2007-02-01 09:57:39 +0000
commit03e3fdd886beeb2bf75dadd34f339a962b979b54 (patch)
treed752f80f571ad7fbba0462a5cbd8e6bc62f29d25 /CSharp/Ivy/IvyPPC/IvyClient.cs
parent6a0c3291fdb3c3c584c2e49b1b297777da19403e (diff)
downloadivy-csharp-03e3fdd886beeb2bf75dadd34f339a962b979b54.zip
ivy-csharp-03e3fdd886beeb2bf75dadd34f339a962b979b54.tar.gz
ivy-csharp-03e3fdd886beeb2bf75dadd34f339a962b979b54.tar.bz2
ivy-csharp-03e3fdd886beeb2bf75dadd34f339a962b979b54.tar.xz
Utilisateur : Fcolin Date : 3/11/03 Heure : 18:48 Archivé dans $/EScribe/Ivy Commentaire: (vss 9)
Diffstat (limited to 'CSharp/Ivy/IvyPPC/IvyClient.cs')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyClient.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs
index 006b69c..faddee4 100644
--- a/CSharp/Ivy/IvyPPC/IvyClient.cs
+++ b/CSharp/Ivy/IvyPPC/IvyClient.cs
@@ -134,6 +134,7 @@ namespace IvyBus
private Hashtable regexp_text;
private int appPort;
private bool peerCalling;
+ private volatile bool running = false;
private volatile Thread clientThread; // volatile to ensure the quick communication
private Int32 clientKey;
private static bool doping = (ConfigurationSettings.AppSettings["IVY_PING"] != null);
@@ -257,6 +258,11 @@ namespace IvyBus
// we can be summoned to quit from two path at a time
clientThread = null;
t.Interrupt();
+ // Tell newThread to go to sleep.
+ running = false;
+ // Wait for newThread to end.
+ t.Join();
+
}
/// <summary> compares two peers the id is the couple (host,service port).
@@ -332,7 +338,7 @@ namespace IvyBus
traceDebug("normally Disconnected from " + appName);
traceDebug("Thread stopped");
// first, I'm not a first class IvyClient any more
- //bus.removeClient(this);
+ // bus.removeClient(this);
// invokes the Disconnected applicationListeners
bus.FireClientDisconnected(this);
}