summaryrefslogtreecommitdiff
path: root/Ivy/IvyTCPStreamV3.cs
diff options
context:
space:
mode:
authorfcolin2012-03-18 17:29:48 +0000
committerfcolin2012-03-18 17:29:48 +0000
commit80414ffe1788a8b9de18e38734544173db902015 (patch)
tree87c9bee26fb1d0d94765907c072f7d421f9f5046 /Ivy/IvyTCPStreamV3.cs
parent4f5cb588bd29d89337a9286d4efdc88536931b32 (diff)
downloadivy-csharp-80414ffe1788a8b9de18e38734544173db902015.zip
ivy-csharp-80414ffe1788a8b9de18e38734544173db902015.tar.gz
ivy-csharp-80414ffe1788a8b9de18e38734544173db902015.tar.bz2
ivy-csharp-80414ffe1788a8b9de18e38734544173db902015.tar.xz
Dispose rules detected by VS2011
Diffstat (limited to 'Ivy/IvyTCPStreamV3.cs')
-rw-r--r--Ivy/IvyTCPStreamV3.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Ivy/IvyTCPStreamV3.cs b/Ivy/IvyTCPStreamV3.cs
index aa76e93..00e8688 100644
--- a/Ivy/IvyTCPStreamV3.cs
+++ b/Ivy/IvyTCPStreamV3.cs
@@ -23,6 +23,7 @@ namespace IvyBus
private StreamReader input;
private StreamWriter output;
private IvyProtocol receiver;
+ private Object outputLock = new Object();
internal IvyTCPStreamV3(Socket socket, IvyProtocol receiver) : base(socket)
{
@@ -67,8 +68,8 @@ namespace IvyBus
private void SendMsg(MessageType msgType, int msgId, string msgData)
{
- // IOException Should be traited upstairs
- lock (this.output)
+ // IOException Should be traited upstairs
+ lock (this.outputLock)
{
this.output.Write((int)msgType);
this.output.Write(' ');