summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC/IvyClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy/IvyPPC/IvyClient.cs')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyClient.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs
index 9451265..eabdfb1 100644
--- a/CSharp/Ivy/IvyPPC/IvyClient.cs
+++ b/CSharp/Ivy/IvyPPC/IvyClient.cs
@@ -260,9 +260,9 @@ namespace IvyBus
return ;
// we can be summoned to quit from two path at a time
clientThread = null;
- t.Interrupt();
// Tell newThread to go to sleep.
running = false;
+ t.Interrupt();
// Wait for newThread to end.
t.Join();
@@ -315,6 +315,13 @@ namespace IvyBus
break;
}
}
+ catch (ThreadInterruptedException te)
+ {
+ Console.Error.WriteLine( te.Message );
+ Console.Error.WriteLine( te.StackTrace);
+ running = false;
+ break;
+ }
catch (IvyException ie)
{
Console.Error.WriteLine( ie.Message );
@@ -340,10 +347,11 @@ namespace IvyBus
}
traceDebug("normally Disconnected from " + appName);
traceDebug("Thread stopped");
- // first, I'm not a first class IvyClient any more
- // bus.removeClient(this);
// invokes the Disconnected applicationListeners
bus.FireClientDisconnected(this);
+ // first, I'm not a first class IvyClient any more
+ bus.removeClient(this);
+
}
private void sendBuffer(String buffer)