summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:46:47 +0000
committerfcolin2007-02-01 09:46:47 +0000
commitb9cc2b31401f7ea67983057ace7036beb624d322 (patch)
tree8ae6d20aa9941eb41cf6661004c76961adc062e9
parent19912167e1ae818eefb0ba8ee0ffa01466af6a98 (diff)
downloadivy-csharp-b9cc2b31401f7ea67983057ace7036beb624d322.zip
ivy-csharp-b9cc2b31401f7ea67983057ace7036beb624d322.tar.gz
ivy-csharp-b9cc2b31401f7ea67983057ace7036beb624d322.tar.bz2
ivy-csharp-b9cc2b31401f7ea67983057ace7036beb624d322.tar.xz
Utilisateur : Fcolin Date : 22/12/05 Heure : 15:05 Archivé dans $/CSharp/Ivy Commentaire: (vss 26)
-rw-r--r--CSharp/Ivy/Ivy/IvyClient.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/CSharp/Ivy/Ivy/IvyClient.cs b/CSharp/Ivy/Ivy/IvyClient.cs
index 82e29bb..84f93e8 100644
--- a/CSharp/Ivy/Ivy/IvyClient.cs
+++ b/CSharp/Ivy/Ivy/IvyClient.cs
@@ -257,7 +257,7 @@ namespace IvyBus
running = false;
if ( stream != null )
stream.Close();
- if ( Thread.CurrentThread != clientThread )
+ if (Thread.CurrentThread != clientThread && clientThread != null)
{
// Wait for Thread to end.
clientThread.Join();
@@ -446,9 +446,16 @@ namespace IvyBus
{
lock( bindings )
{
- IvyBindingBase bind = (IvyBindingBase) bindings[id];
- bus.FireClientRemoveBinding( this, bind.expression );
- bindings.Remove(id);
+ try
+ {
+ IvyBindingBase bind = (IvyBindingBase)bindings[id];
+ bus.FireClientRemoveBinding(this, bind.expression);
+ bindings.Remove(id);
+ }
+ catch (KeyNotFoundException ex)
+ {
+ Console.WriteLine("DelBinding " + ex.Message);
+ }
}
}
public void TokenMsg(ushort id, string[] arg)