diff options
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r-- | CSharp/Ivy/Ivy/IvyClient.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CSharp/Ivy/Ivy/IvyClient.cs b/CSharp/Ivy/Ivy/IvyClient.cs index dbf8ef1..31ccdd5 100644 --- a/CSharp/Ivy/Ivy/IvyClient.cs +++ b/CSharp/Ivy/Ivy/IvyClient.cs @@ -265,12 +265,14 @@ namespace IvyBus return ;
// Tell Thread to stop.
running = false;
- in_stream.Close();
+ if ( in_stream != null )
+ in_stream.Close();
if ( Thread.CurrentThread != clientThread )
{
// Wait for Thread to end.
clientThread.Join();
}
+
clientThread = null;
}
|