summaryrefslogtreecommitdiff
path: root/Ivy/IvyUDPStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ivy/IvyUDPStream.cs')
-rw-r--r--Ivy/IvyUDPStream.cs21
1 files changed, 11 insertions, 10 deletions
diff --git a/Ivy/IvyUDPStream.cs b/Ivy/IvyUDPStream.cs
index 986a550..0e64381 100644
--- a/Ivy/IvyUDPStream.cs
+++ b/Ivy/IvyUDPStream.cs
@@ -77,19 +77,20 @@ namespace IvyBus
if (disposing)
{
// Free other state (managed objects).
+ if (out_stream != null)
+ {
+ out_stream.Close();
+ out_stream = null;
+ }
+ if (in_stream != null)
+ {
+ in_stream.Close();
+ in_stream = null;
+ }
}
// Free your own state (unmanaged objects).
// Set large fields to null.
- if (out_stream != null)
- {
- out_stream.Close();
- out_stream = null;
- }
- if (in_stream != null)
- {
- in_stream.Close();
- in_stream = null;
- }
+
}
#endregion
}