From f76912a34f4403c0c5e8b840d5744e48d8a98f2f Mon Sep 17 00:00:00 2001 From: Marc Date: Mon, 8 Apr 2013 11:07:08 -0700 Subject: [PATCH] Lock formatters instead of this. Toss errors to the connection up the call stack. --- Conn.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Conn.cs b/Conn.cs index 10e395c..f97e028 100644 --- a/Conn.cs +++ b/Conn.cs @@ -44,7 +44,7 @@ public class Conn public object recieveObject( Stream stream ) { object obj = null; - lock( this ) + lock( m_formatter ) { try { @@ -62,7 +62,7 @@ public class Conn public void send( object obj ) { - lock( this ) + lock( m_formatter ) { try { @@ -82,8 +82,7 @@ public class Conn catch( Exception e ) { lib.Log.warn( "Exception sending obj {0} of {1}", obj, e ); - //m_streamNet.Close(); - //m_socket.Close(); + throw; } } }