summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CSharp/Ivy/Ivy/IvyWatcher.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/CSharp/Ivy/Ivy/IvyWatcher.cs b/CSharp/Ivy/Ivy/IvyWatcher.cs
index 0cacef6..b943b21 100644
--- a/CSharp/Ivy/Ivy/IvyWatcher.cs
+++ b/CSharp/Ivy/Ivy/IvyWatcher.cs
@@ -164,7 +164,9 @@ namespace IvyBus
stream.Close();
if (listenThread != null)
{
- listenThread.Join();
+ // Wait for Thread to end.
+ bool term = listenThread.Join(10000);
+ if (!term && (listenThread != null)) listenThread.Abort();
listenThread = null;
}
// it might not even have been created